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

Intersphinx mapping for stdlib version #485

Open
stefan6419846 opened this issue Apr 7, 2024 · 0 comments
Open

Intersphinx mapping for stdlib version #485

stefan6419846 opened this issue Apr 7, 2024 · 0 comments

Comments

@stefan6419846
Copy link

In my code, I have type hints which refer to importlib.metadata. The corresponding docs at https://docs.python.org/3/library/importlib.metadata.html point to the docs of importlib_metadata for the API reference and do not explicitly list the API details. importlib_metadata provides them.

Now I am trying to generate docs using Sphinx and utilize the intersphinx mapping functionality to link to importlib.metadata members. With this, I am in the situation that I would have to use importlib_metadata only to ensure that the docs and especially the intersphinx mappings work correctly and I have no undefined references.

At the moment, there basically are two mapping files:

  • The stdlib one does not provide references for importlib.metadata as the API reference is not part of the stdlib docs.
  • The importlib_metadata one provides references for importlib_metadata imports, but not for the importlib.metadata ones.

My current workaround is to basically generate a custom version of the importlib_metadata intersphinx mapping which replaces all importlib_metadata names with importlib.metadata, but this does not feel like a good solution.

What is the correct approach to get the intersphinx mapping working for both the stdlib and standalone versions without having to solely rely on the standalone version? (Please note that I am not sure which issue tracker is more suitable for this, but as the standalone version provides the API reference, I just went with this repository for now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant