-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Properly lazily import shutil #3023
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
|
Okay, that's everything! |
|
Can you target this at stable instead? |
|
There's a test that checks what modules are imported, you can probably remove shutil from that list as well. |
|
I changed to stable and updated that test! If it's fine with you, I'm interested in the coming weeks/months making sure that everything (within reason) is lazily imported. |
|
Definitely, it's a bit annoying to code, but I think the speed is worth it for the CLI. We want to distinguish between what's going to be imported no matter what (general Python startup / used everywhere anyway) versus what only comes up in certain use cases. That's what that import test is for, so we know if something gets imported unintentionally, and can review imports from time to time. |
|
@ofek Can you rebase onto current stable. There are my commits that merge stable into master on the branch. Same thing happened to me and I am not sure how exactly. |
|
Done! |
|
@ofek Could you please add a change entry for this on another PR. I did not see there was not one. |
|
I'll take care of the CHANGES mention, don't worry about it. |
I agree with the intention to lazily import but it wasn't actually happening. Locally I get the following on Python 3.12: