Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
gpshead merged 7 commits intopython:mainfromgpshead:non-90s-urlparse-cache
May 12, 2021

Conversation

gpshead
Copy link
Member

@gpsheadgpshead commentedMay 1, 2021
edited by miss-islington
Loading

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

erlend-aasland reacted with thumbs up emoji
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.
@gpshead
Copy link
MemberAuthor

I won't merge this until after the 3.10 branch is cut and all of thehttps://bugs.python.org/issue43882 fixes are in.

@gpsheadgpshead requested a review fromorsenthilMay 1, 2021 22:55
Copy link
MemberAuthor

@gpsheadgpshead left a 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.

@rhettinger
Copy link
Contributor

It looks like the Travis CI failed only because of excess whitespace. Running 'make patchcheck' would likely clear it.

gpshead reacted with thumbs up emoji

@orsenthil
Copy link
Member

This final change, which addressed the review comments from the reviewers looks good to me.

gpshead reacted with thumbs up emoji

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.
@gpshead
Copy link
MemberAuthor

Status: awaiting a copy of#25853 to be merged intomain before merging this one.

@miss-islington
Copy link
Contributor

@gpshead: Status check is done, and it's a failure ❌ .

@miss-islington
Copy link
Contributor

@gpshead: Status check is done, and it's a success ❌ .

@gpsheadgpshead merged commitd597fdc intopython:mainMay 12, 2021
@gpsheadgpshead deleted the non-90s-urlparse-cache branchMay 12, 2021 00:01
@orsenthil
Copy link
Member

Excellent change.@gpshead :)

gpshead and erlend-aasland reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@akulakovakulakovakulakov left review comments

@rhettingerrhettingerrhettinger left review comments

@tirkarthitirkarthitirkarthi left review comments

@serhiy-storchakaserhiy-storchakaserhiy-storchaka approved these changes

@orsenthilorsenthilAwaiting requested review from orsenthil

Assignees

@gpsheadgpshead

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

9 participants
@gpshead@rhettinger@orsenthil@miss-islington@akulakov@serhiy-storchaka@tirkarthi@the-knights-who-say-ni@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp