GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||
GeezerVison is showing github.com — bpo-25711: zipimport rewritten in Python by warsaw · Pull Request #4023 · python/cpython Conversation
| ||||||||||||||||||||||
| @@ -0,0 +1 @@ | |||
| zipimport has been rewritten in pure Python. | |||
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
A separate news entry for the DeprecationWarning -> TypeError change for creating zip importers directly from bytes paths would probably make sense. (Or at least mentioning it in this one)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| _importing_zlib = False | ||
|
|
||
| # Return the zlib.decompress function object, or NULL if zlib couldn't |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
NULL doesn't exist in python. Should be "raises a ZipImportError ..."
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I wonder if it's really so useful to keep this PR around, especially in light of @Yhg1s promised rewrite? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
It can always be re-opened. I do still plan to open-source my zipimport rewrite, hopefully before PyCon, but it is in C, not Python. If people value having a pure-Python version of zipimport in the standard library, that's a different matter. (I do recommend not using zipimport.c as a guide for a pure-Python version of zipimport, as this version has done... It has a number of bugs, like how it handles offsets in the central directory and how it closes and then re-opens the ZIP file, which may have changed, without re-reading the central directory. Also, no zip64 support. And as written, zipimport.py (partially) reimplements zipfile, which is a bit of a shame... Although I also have plenty of issues with zipfile :-P) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Alright, I'm closing this since I don't think it has a viable future. It was mainly an exercise in trying to convert the original bpo patch into a branch+PR. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.