-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
gh-84232: Fix pydoc docs.python.org link generation
#139995
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
base: main
Are you sure you want to change the base?
Conversation
|
Requesting Serhiy per experts list. |
|
UBSan failure is unrelated. |
|
@picnixz Thanks for the helpful reviews on the (other) |
Lib/pydoc.py
Outdated
| module_docs = None | ||
|
|
||
| if object.__name__ in module_docs.module_docs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
module_docs.module_docs is invalid if module_docs is None.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that the above code contains a lot of hardcoded special cases. We could add few more special cases for modules documented in other file.
If generate the mapping in Sphynx, then these special cases may be not needed. But such solution perhaps cannot be backported.
This code only works for installed Python, so it will not be easy to tests it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code only works for installed Python, so it will not be easy to tests it.
It does not have to, with #139997 refactoring/improving the stdlib module check this will be accounted for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If generate the mapping in Sphynx, then these special cases may be not needed. But such solution perhaps cannot be backported.
Why not, we can regenerate the data in the backport?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original comment here has been addressed.
pydoc docs.python.org link generationpydoc docs.python.org link generation
pydocinncorrectly assumes a module has documentation and where #139971📚 Documentation preview 📚: https://cpython-previews--139995.org.readthedocs.build/