-
-
Notifications
You must be signed in to change notification settings - Fork 254
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The Pex CLI should warn when it creates a PEX zip that requires zip64. #2247
Comments
It looks like this can be checked robustly and quickly like so (for Python 2.7
Here the huge PEX zip is the one from this Pants issue which is what originated this issue. The remaining issue with this approach is it's only valid for the interpreter used to execute the test. The PEX file might be run under a different interpreter which may have support in |
Ok, and the full gamut. It looks like PyPy also doesn't do zip64 in zipimport. It quickly fails in a different way for pypy3.7 and older, but that can be accounted for:
|
By default Pex now warns for un-useable PEX zipapps it creates, but it can be made to error or do nothing at all. Fixes pex-tool#2247
The python zipimporter used to execute a zipapp
__main__.py
in the zip cannot handle zips that require zip64 extensions (see: https://bugs.python.org/issue32959). As such, if the Pex CLI can detect when it creates such a zip, it should warn if the detection is approximate or probably error if it is definite; otherwise the error later at runtime is a mysterious:At some point this will be fixed (presumably) for some CPython versions, in which case the logic gets trickier. The absolute worst thing to do here would be to warn or error for a PEX that works with a version of Python where this is no longer a limitation!
This does raise the question of whether or not this is an issue for PyPy - no clue.
The text was updated successfully, but these errors were encountered: