Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make "availability" directive consistent and parsable #95415

Open
tiran opened this issue Jul 29, 2022 · 0 comments
Open

Make "availability" directive consistent and parsable #95415

tiran opened this issue Jul 29, 2022 · 0 comments
Labels
docs Documentation in the Doc dir

Comments

@tiran
Copy link
Member

tiran commented Jul 29, 2022

Documentation

The .. availability:: directives in our documentation do not use a consistent syntax. The arguments are all over the place. For example versions are indicate as Linux >= 4.2, Linux 4.2 and newer, or Linux 4.2 or later. Some directives have additional content that point to man pages. Others reference minimum versions although we no longer support the version (e.g. FreeBSD 9 or later although FreeBSD 9 is not supported any more).

I would like to make the availability directive arguments consistent and parsable:

  • Use consistent spelling for version restrictions platform >= version.
  • Introduce not prefix to indicate that a feature is not available on that platform.
  • Check for known platform strings and emit a warning when a platform is not in an allow list.
  • Enable has_content for the directive and move all additional remarks to the contents body of the directive.
.. availability:: Windows, Linux >= 3.17, not WASI

   See :manpage:`python(1)` for more information

A consistent and parsable syntax will allow us to automatically generate a table of non-supported features on Emscripten and WASI later.

@tiran tiran added the docs Documentation in the Doc dir label Jul 29, 2022
tiran added a commit to tiran/cpython that referenced this issue Jul 29, 2022
tiran added a commit to tiran/cpython that referenced this issue Jul 29, 2022
…GH-95416).

(cherry picked from commit f81a6c5)

Co-authored-by: Christian Heimes <christian@python.org>
tiran added a commit that referenced this issue Aug 1, 2022
…H-95438)

Co-authored-by: Christian Heimes <christian@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

No branches or pull requests

1 participant