Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.4k
bpo-44002: Switch to lru_cache in urllib.parse.#25798
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
urllib.parse now uses functool.lru_cache for its internal URL splitting andquoting caches instead of rolling its own like its the 90s.The undocumented internal Quoted class and clear_cache() APIs are nowdeprecated, for removal in 3.14.
I won't merge this until after the 3.10 branch is cut and all of thehttps://bugs.python.org/issue43882 fixes are in. |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The test that's failing due to an unexpected BytesWarning in CI is annoying... that means we need to uselru_cache(typed=True)
on the urlsplit decorator for safety to avoid other people who enable BytesWarning from seeing that warning.
Uh oh!
There was an error while loading.Please reload this page.
It looks like the Travis CI failed only because of excess whitespace. Running 'make patchcheck' would likely clear it. |
This final change, which addressed the review comments from the reviewers looks good to me. |
twisted, gevent, and our own libregrtest use it in test suites. We'llkeep it for them.... and skip Pending on Quoter's DeprecationWarning. No uses of that havebeen found externally.Also reoragnizes the unittest a bit to be cleaner and fixes a whitespaceproblem.
Status: awaiting a copy of#25853 to be merged into |
Uh oh!
There was an error while loading.Please reload this page.
@gpshead: Status check is done, and it's a failure ❌ . |
@gpshead: Status check is done, and it's a success ❌ . |
Excellent change.@gpshead :) |
Uh oh!
There was an error while loading.Please reload this page.
urllib.parse now uses functool.lru_cache for its internal URL splitting and
quoting caches instead of rolling its own like its the 90s.
The undocumented internal Quoted class is now deprecated, for removal in 3.14.
No existing users were found.
clear_cache() is kept as twisted, gevent, and our own regression test runner were
found to be using it in their test suites.
https://bugs.python.org/issue44002
Automerge-Triggered-By: GH:gpshead