[New-bugs-announce] [issue44002] Use functools.lru_cache in urllib.parse instead of 1996 custom caching
Gregory P. Smith
report at bugs.python.org
Sat May 1 14:17:15 EDT 2021
New submission from Gregory P. Smith <greg at krypto.org>:
`urllib.parse` has custom caching code for both `urlsplit()` and `quote()`. From 1996.
https://github.com/python/cpython/commit/3fd32ecd9232fcb041b9f1f7a19a1e7e65cf11a0
https://github.com/python/cpython/commit/74495409861b357d9925937d6576229c74e2550d
with a truthful comment added by Nick in 2010 that we should just use functools.lru_cache.
https://github.com/python/cpython/commit/9fc443cf590c76d4b979c46dc954d3956cee0319#diff-b3712475a413ec972134c0260c8f1eb1deefb66184f740ef00c37b4487ef873e
time to clean up this cruft and do that.
I'm waiting for after the 3.10 cut and a still in progress urllib.parse security fix to land before rebasing my soon to be attached PR to avoid code conflicts.
----------
assignee: gregory.p.smith
components: Library (Lib)
messages: 392614
nosy: gregory.p.smith
priority: normal
severity: normal
status: open
title: Use functools.lru_cache in urllib.parse instead of 1996 custom caching
type: enhancement
versions: Python 3.11
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44002>
_______________________________________
More information about the New-bugs-announce
mailing list