Skip to content

Conversation

@StanFromIreland
Copy link
Member

@StanFromIreland StanFromIreland commented Oct 12, 2025

@StanFromIreland
Copy link
Member Author

Requesting Serhiy per experts list.

@StanFromIreland
Copy link
Member Author

UBSan failure is unrelated.

@StanFromIreland
Copy link
Member Author

@picnixz Thanks for the helpful reviews on the (other) pydoc PR, I also happen to have this one if you are interested, I'd appreciate your thoughts.

Lib/pydoc.py Outdated
Comment on lines 586 to 588
module_docs = None

if object.__name__ in module_docs.module_docs:
Copy link
Member

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.

Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member Author

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?

Copy link
Member Author

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.

@StanFromIreland StanFromIreland changed the title gh-139971: Fix pydoc docs.python.org link generation gh-84232: Fix pydoc docs.python.org link generation Oct 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants