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

User “Zero-cost” exceptions #29

Closed
ehooo opened this issue Sep 11, 2023 · 3 comments
Closed

User “Zero-cost” exceptions #29

ehooo opened this issue Sep 11, 2023 · 3 comments

Comments

@ehooo
Copy link

ehooo commented Sep 11, 2023

In python 3.11 are implemented a performance for try blocks:

  • “Zero-cost” exceptions are implemented, eliminating the cost of try statements when no exception is raised. (Contributed by Mark Shannon in bpo-40222.)

On the PR #28 the way that manage the Django 3.0 deprecation imports are not use this performance.
We need to reorder the importation in the try block to use that improve.

@ehooo
Copy link
Author

ehooo commented Sep 11, 2023

@mpasternak i will do when i have time

@mpasternak
Copy link
Member

Hello Victor! How are you?

Thanks for letting me know, I did not know about that optimization. Let me know when you have a patch ready. Thanks!

@mpasternak
Copy link
Member

Merged, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants