Skip to content

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

Closed
wants to merge 2 commits into from

Conversation

agfor
Copy link

@agfor agfor commented May 14, 2018

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
Copy link
Member

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?

Copy link
Member

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.

@matrixise
Copy link
Member

@serhiy-storchaka I can't merge this PR, if you want to merge it, let's go! ;-)

@serhiy-storchaka
Copy link
Member

I don't know whether this change is worth merging.

@serhiy-storchaka serhiy-storchaka requested a review from pitrou May 14, 2018 19:52
@matrixise
Copy link
Member

ok thanks for your feedback @serhiy-storchaka

@csabella csabella requested a review from ncoghlan May 22, 2019 10:19
@csabella csabella requested review from ncoghlan and pitrou and removed request for ncoghlan and pitrou February 7, 2020 11:28
Copy link
Member

@pitrou pitrou left a 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.

@bedevere-bot
Copy link

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 I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@csabella
Copy link
Contributor

@agfor, please take a look at the review comments from pitrou. Thanks!

@AlexWaygood AlexWaygood added the performance Performance or resource usage label Apr 11, 2022
@AlexWaygood
Copy link
Member

I'm closing this PR, since it has been 2 years and @pitrou's review comments have still not been addressed.

@agfor: if you're still interested in working on this issue, please feel free to continue discussing it at #77621 and/or submit a new PR 🙂

@iritkatriel iritkatriel added 3.12 only security fixes and removed 3.12 only security fixes labels Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting changes performance Performance or resource usage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants