-
-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
bpo-46353: Fix "pydoc -k" when a module fails to load #30557
base: main
Are you sure you want to change the base?
Conversation
The 'spec' value, here coming from pkgutil._get_spec(), may be None because <importer>.find_module() may return None. We account for this in pydoc's ModuleScanner and skip such modules scan.
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.
Thank you! Is there any good way to test this?
That did not appear easy at first sight. That's typically something that a type checker would catch. |
This PR is stale because it has been open for 30 days with no activity. |
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.
Could you add a test please?
The 'spec' value, here coming from pkgutil._get_spec(), may be None
because .find_module() may return None. We account for this in
pydoc's ModuleScanner and skip such modules scan.
https://bugs.python.org/issue46353