-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
Docs: Test presence of optional extensions with importlib #130445
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
Conversation
extensions.append(optional_ext) | ||
except (ImportError, ValueError): | ||
pass | ||
del _OPTIONAL_EXTENSIONS |
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.
Does this make much difference?
del _OPTIONAL_EXTENSIONS |
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.
We should avoid polluting the conf.py
namespace, as it is read for Sphinx configuration. The underscore and del
may be overkill, but just being explicit.
Thanks @AA-Turner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
…30445) (cherry picked from commit 3cc9e86) Co-authored-by: Adam Turner <[email protected]>
GH-130464 is a backport of this pull request to the 3.13 branch. |
Sorry, @AA-Turner, I could not cleanly backport this to
|
…honGH-130445) (cherry picked from commit 3cc9e86) Co-authored-by: Adam Turner <[email protected]>
GH-130466 is a backport of this pull request to the 3.12 branch. |
…130445) (#130464) (cherry picked from commit 3cc9e86) Co-authored-by: Adam Turner <[email protected]>
…130445) (#130466) * [3.12] Docs: Test presence of optional extensions with importlib (GH-130445) (cherry picked from commit 3cc9e86) Co-authored-by: Adam Turner <[email protected]>
We don't need to import the extensions, and this is more compact if we add more optional extensions.
A
📚 Documentation preview 📚: https://cpython-previews--130445.org.readthedocs.build/