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

deprecate werkzeug.urls #2600

Closed
davidism opened this issue Feb 27, 2023 · 0 comments · Fixed by #2608
Closed

deprecate werkzeug.urls #2600

davidism opened this issue Feb 27, 2023 · 0 comments · Fixed by #2608
Assignees
Milestone

Comments

@davidism
Copy link
Member

Most of the code in werkzeug.urls is a copy of Python 2's urlparse and Python 3's urllib.parse, modified for compatibility between both. Due to the Python 2 to 3 transition for the WSGI spec, it does a ton of str/bytes checks and conversions, even though we only support Python 3 now and could assume str in a lot more places. After #2406 pointed out performance issues, an initial patch to replace our implementation with urllib.parse resulted in a 35% speedup in routing and responses.

The uri_to_iri and iri_to_uri functions will remain, but everything else will be deprecated.

@davidism davidism added this to the 2.3.0 milestone Feb 27, 2023
@davidism davidism self-assigned this Feb 27, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant