Skip to content
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

gh-109653: What's new: Note improved import times for several stdlib modules in Python 3.13 #118697

Merged
merged 2 commits into from
May 7, 2024

Conversation

AlexWaygood
Copy link
Member

@AlexWaygood AlexWaygood commented May 7, 2024

@AlexWaygood AlexWaygood requested a review from hugovk May 7, 2024 10:59
@bedevere-app bedevere-app bot added docs Documentation in the Doc dir skip news awaiting core review labels May 7, 2024
@ambv ambv enabled auto-merge (squash) May 7, 2024 11:04
Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

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

Would be nice to include some numbers if appropriate, maybe as a range?

Something like:

 * Several standard library modules have had their import times significantly
-  improved.
+  improved, from around XX% to YY%.

@AlexWaygood
Copy link
Member Author

Would be nice to include some numbers if appropriate, maybe as a range?

I'll add some ballpark figures.

I'm slightly wary of being too precise, because you'll only e.g. enjoy the typing import speedup if you've also avoided importing contextlib and re (and anything that might import contextlib and re) elsewhere in your code. If you're writing a small CLI tool where startup times are really important, it's more likely that you're already being careful about that kind of thing, so it's more likely you'll see an improvement. But as soon as you e.g. import asyncio, it's game over.

@hugovk hugovk disabled auto-merge May 7, 2024 11:13
@hugovk
Copy link
Member

hugovk commented May 7, 2024

Yep, a rough ballpark is perfect. As you say, this really helps CLIs rather than big apps or libraries. People who really care can click through to the PRs to see the full details.

@AlexWaygood AlexWaygood requested a review from hugovk May 7, 2024 11:17
@AlexWaygood AlexWaygood enabled auto-merge (squash) May 7, 2024 11:34
@AlexWaygood AlexWaygood merged commit 44a9f3d into python:main May 7, 2024
25 checks passed
@AlexWaygood AlexWaygood deleted the whatsnew-scoobydoo branch May 7, 2024 11:34
SonicField pushed a commit to SonicField/cpython that referenced this pull request May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve import time of various stdlib modules
2 participants