Skip to content

Conversation

@barneygale
Copy link
Contributor

@barneygalebarneygale commented Nov 18, 2023

Import contextlib, glob and re only as required.

Import `contextlib`, `glob` and `re` only as required.
@barneygalebarneygale marked this pull request as ready for review November 21, 2023 03:00
Copy link
Member

@AlexWaygoodAlexWaygood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This cuts >50% off the import time for me locally, which is fantastic! Definitely worth doing -- I left some thoughts above about the particulars :)

Co-authored-by: Alex Waygood <[email protected]>
Copy link
Member

@AlexWaygoodAlexWaygood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ship it!

@barneygale
Copy link
ContributorAuthor

Thank you very much :)

@barneygalebarneygale enabled auto-merge (squash) November 25, 2023 17:28
@barneygalebarneygale merged commit bbb4367 into python:mainNov 25, 2023
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
Import `contextlib`, `glob` and `re` only as required. Co-authored-by: Alex Waygood <[email protected]>
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
Import `contextlib`, `glob` and `re` only as required. Co-authored-by: Alex Waygood <[email protected]>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performancePerformance or resource usagetopic-pathlib

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@barneygale@AlexWaygood