Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
gh-117865: Defer several imports in inspect.py#119526
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 ourterms of service andprivacy 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
I'm about to board a flight, but I think this cuts nearly 50% off the import time for |
(But this is possibly a redundant optimisation if it turns out that |
I'll keep this on the back burner until it's decided where the newPEP-649 functions will go, and which modules they'll depend on |
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 showed up in my list of review requests, so I want to clear it out even if it's a draft.)
I think we can apply the changes that don't affectast
. My current implementation of the PEP 649 functionality relies very heavily onast
, so it's likely we won't be able to defer that import.
Right -- but |
Uh oh!
There was an error while loading.Please reload this page.
Following153b3f7, it is suddenly much more trivial to make the import of ast lazy in inspect.py. Once that's done, it also becomes worthwhile to make other imports lazy as well