Skip to content

Unix-only pages should each say "Availability: Unix" #106861

Closed

Description

@nedbat

Documentation

This section of the docs has a number of pages: https://docs.python.org/3/library/unix.html . Each is only available on Unix, but the pages themselves don't say this. For example, if you search for the resource module, you get to here: https://docs.python.org/3/library/resource.html, and nothing on that page says it's not available on Windows.

It would be a small change to add "Availability: Unix" to each of these pages to make them more self-contained and quicker to reference.

Linked PRs

Activity

  1. CAM-Gerlach commented on Jul 18, 2023

    @CAM-Gerlach
    Member

    Additionally, some of them actually already have an availability directive (via the wasm_notavail.rst include) that only lists as its contents not Emscripten, not WASI that implies it is available on other platforms. Unfortunately, the rather crude nature of that currently being done as an include makes it not possible to add any other qualifiers to the availability directive.

    Add the appropriate logic to the directive itself (as its already a custom directive, enforces a constrained syntax and parses platform names) to insert the appropriate descriptive content if not Emscripten, not WASI are listed as platforms. To avoid further overloading the directive code with bespoke content and special-casing, and make this easy to configure in the future, this would be stored in the conf.py, along with the known platform names, as a mapping from platform names to standard description content to inject.

    To note, this would also easily allow for auto-cross-referencing platforms named in directives to, e.g. sections describing their current status in Python, configured via the same mechanism. In fact, this could preclude the need for custom description injects at all, the existing usage just slightly elaborates on the base directive content and directs the users to such a section for more information.

  2. CAM-Gerlach commented on Jul 18, 2023

    @CAM-Gerlach
    Member

    I opened #106867 to cover the directive improvements discussed above that are required by this issue.

  3. added 3 commits that reference this issue on Sep 6, 2023
  4. added a commit that references this issue on Oct 31, 2023
  5. added 2 commits that reference this issue on Oct 31, 2023
  6. hugovk commented on Oct 31, 2023

    @hugovk
    Member

    #108975 has been merged and backports will be soon. Thanks!

  7. added 2 commits that reference this issue on Oct 31, 2023
  8. added a commit that references this issue on Nov 3, 2023
  9. added a commit that references this issue on Feb 11, 2024
  10. added a commit that references this issue on Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc direasy

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions