Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.2k
gh-88233: zipfile: refactor _strip_extra#102084
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
13f4fad
to6ebff4a
Compare6e57d1f
toe6abc55
CompareUh oh!
There was an error while loading.Please reload this page.
@serhiy-storchaka If you don't mind, would you take a look at this refactor - see if you have any concerns? |
bedevere-bot commentedSep 25, 2023
|
* Refactor zipfile._strip_extra to use higher level abstractions for extras instead of a heavy-state loop.* Add blurb* Remove _strip_extra and use _Extra.strip directly.* Use memoryview to avoid unnecessary copies while splitting Extras.
* Refactor zipfile._strip_extra to use higher level abstractions for extras instead of a heavy-state loop.* Add blurb* Remove _strip_extra and use _Extra.strip directly.* Use memoryview to avoid unnecessary copies while splitting Extras.
Uh oh!
There was an error while loading.Please reload this page.
While reviewing#96161, I too had difficulty fully understanding the complexities of
_strip_extra
function.This PR refactors that function to use a class with methods separating the concerns (parsing, splitting, filtering, modeling) and using a higher-level abstraction to model the concept.