-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
bpo-33440: Defer imports in pathlib to reduce its import time. #6820
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
Lib/pathlib.py
Outdated
@@ -226,6 +223,7 @@ def is_reserved(self, parts): | |||
|
|||
def make_uri(self, path): | |||
# Under Windows, file URIs use the UTF-8 encoding. | |||
from urllib.parse import quote_from_bytes as urlquote_from_bytes |
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.
What is the reason of the renaming?
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.
there is no reason, you are right but this is just a copy. Now he could remove the renaming.
@serhiy-storchaka I can't merge this PR, if you want to merge it, let's go! ;-) |
I don't know whether this change is worth merging. |
ok thanks for your feedback @serhiy-storchaka |
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.
Sorry, it looks like this review took a long delay for a simple change. This looks good to me on the principle but you need to do two things:
- merge / rebase your changes on git master
- add a NEWS entry for the change (you can use blurb-it or blurb)
Also, would be nice if you posted import benchmark numbers for the change.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
@agfor, please take a look at the review comments from pitrou. Thanks! |
https://bugs.python.org/issue33440