Repository navigation
Reduce memory usage of urllib.unquote and unquote_to_bytes #88500
Description
Activity
- added3.8 (EOL)end of lifeend of lifeextension-modulesC modules in the Modules dirC modules in the Modules dirperformancePerformance or resource usagePerformance or resource usage
on Jun 7, 2021 - changed the title
[-]urllib cannot parse large data[/-][+]urllib.parse.parse_qsl cannot parse large data[/+]on Jun 7, 2021 - changed the title
[-]urllib cannot parse large data[/-][+]urllib.parse.parse_qsl cannot parse large data[/+]on Jun 7, 2021 'eng' claimed in original title that "urllib.parse.parse_qsl cannot parse large data". On original PR, said problem with 6-7 millions bytes.
Claim should be backed up by a generated example that fails with original code and succeeds with new code. Claims of 'faster' also needs some examples.
Original PRs must nearly all propose merging a branch created from main into main. Performance enhancements are often not backported.
- added3.11only security fixesonly security fixesand removed3.8 (EOL)end of lifeend of life
on Jun 7, 2021 - changed the title
[-]urllib.parse.parse_qsl cannot parse large data[/-][+]Use bytearray in urllib.unquote_to_bytes[/+]on Jun 7, 2021 - added3.11only security fixesonly security fixesand removed3.8 (EOL)end of lifeend of life
on Jun 7, 2021 - changed the title
[-]urllib.parse.parse_qsl cannot parse large data[/-][+]Use bytearray in urllib.unquote_to_bytes[/+]on Jun 7, 2021 4 remaining items
The PR was closed due to technicalities (pointing to the wrong branch, CLA) and the OP didn’t follow up.
Unless someone object I will close this issue as well.
- addedpendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is provided
on Sep 11, 2022 - added a commit that references this issue
on Sep 12, 2022 - addedstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory3.12only security fixesonly security fixesand removedextension-modulesC modules in the Modules dirC modules in the Modules dir3.9 (EOL)end of lifeend of life
on Sep 12, 2022 - changed the title
[-]Use bytearray in urllib.unquote_to_bytes[/-][+]Reduce memory usage of urllib.unquote and unquote_to_bytes[/+]on Sep 12, 2022 I created a new PR and included fixing a similar legacy design issue in
unquote()as well as the original report'sunquote_to_bytes(). Some performance microbenchmarks need running before I'll consider moving forward with it.If someone wanted to consider this a security issue it could be backported. It is at most a fixed constant factor (roughly
$len(input) * sizeof(PyObject)$ memory consumption vs a maximally antagonistic input though. That doesn't smell DoS worthy.- removedpendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is provided
on Sep 12, 2022 - added a commit that references this issue
on Dec 11, 2022
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
urllib.unquote#96763