-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Filename encoding error in some environments with PAX sdist #7667
Comments
@ncoghlan Just an FYI, the issue I noted on pypa/wheel#331 was using Python 3.6 (in case that has any bearing here). |
In the process of justifying not fixing this, I figured out enough to fix it. :( See #7668. |
@johnthagen Yeah, the non-universal locale encoding problem I mention in #7668 (comment) will apply Python 3 as well. However 3.7+ mitigate it significantly, as they don't believe the OS when it claims to be using ASCII, and automatically switch to using UTF-8 instead. |
As found recently, pip with Python 3.6 and forward has some issues installing tarballs that contain files with non-ascii characters in their names. This is due mainly to the fact that the default locale in the system is set to C [1]. As a workaround, we run the installation of the packages in the virtualenv forcing C.UTF-8 locale. [1] pypa/pip#7667 Change-Id: Idfb8b121a43a0bb74844fd63d5c2507d7b888b15
* Update ironic-python-agent-builder from branch 'master' - Fix pip install pkgs with non-ascii characters in filenames As found recently, pip with Python 3.6 and forward has some issues installing tarballs that contain files with non-ascii characters in their names. This is due mainly to the fact that the default locale in the system is set to C [1]. As a workaround, we run the installation of the packages in the virtualenv forcing C.UTF-8 locale. [1] pypa/pip#7667 Change-Id: Idfb8b121a43a0bb74844fd63d5c2507d7b888b15
This issue is marked as "python 2 only". pip 21.0 dropped support for Python 2. Should this be closed? |
The I’ll remove the Python 2-only label. |
Environment
(pip Windows CI hits this)
Description
The PAX format wheel 0.34.1 sdists fail to install on Python 2.7 on Windows with a UnicodeEncodeError, or on non-Windows systems in a non-utf-8 locale: pypa/wheel#331
Expected behavior
Unicode filename from the PAX tarball is correctly encoded for the local filesystem.
How to Reproduce
Attempt to install a PAX formatted tarball containing a file name that cannot be encoded to the default code page (Windows) or the default locale encoding (non-Windows).
In GNU tar, the affected paths are pre-mangled to something ASCII compatible, but PAX tar preserves them correctly, so the installer needs to handle them itself.
Output
See
https://dev.azure.com/pypa/pip/_build/results?buildId=18040&view=logs&j=404e6841-f5ba-57d9-f2c8-8c5322057572&t=0219f6bf-240d-5b08-c877-377b12af5079&l=309 for a Windows example in the pip test suite.
The wheel issue linked above has some Linux examples.
The text was updated successfully, but these errors were encountered: