Skip to content
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

WindowsError installing a package with a non-ascii filename #704

Closed
jaraco opened this issue Jul 30, 2016 · 2 comments
Closed

WindowsError installing a package with a non-ascii filename #704

jaraco opened this issue Jul 30, 2016 · 2 comments

Comments

@jaraco
Copy link
Member

@jaraco jaraco commented Jul 30, 2016

Originally reported in cherrypy/cherrypy#1467, easy_install will crash when attempting to build a bdist_egg for a package which contains a file whose filename has non-ascii characters. The issue occurs in rmtree even if the stdlib rmtree is used.

@jaraco
Copy link
Member Author

@jaraco jaraco commented Jul 30, 2016

It's a bug in python, which appears to have a long sordid history. The failure is happening because a bytestring is being passed to shutil.rmtree or the equivalent, which on Windows returns broken filenames. It's probably straightforward to work around the issue by ensuring that the parameter to shutil.rmtree is unicode.

@jaraco
Copy link
Member Author

@jaraco jaraco commented Jul 30, 2016

Interestingly, I've discovered that the issue also only seems to happen if the sdist is a zip file. When the sdist is a tar.gz, the extract step seems to silently discard the unicode filename.

jaraco added a commit that referenced this issue Jul 30, 2016
…r in the filename of a zip sdist. Ref #704.
jaraco added a commit that referenced this issue Jul 30, 2016
@jaraco jaraco closed this in 8579495 Jul 30, 2016
sileht added a commit to sileht/setuptools that referenced this issue Aug 2, 2016
This reverts commit 8579495.

As we can see on pypa#709,
this breaks many things (easy_install C extensions, all py3.5 tests,
run with LANG=C).

So instead of fixing in a hurry all new bugs due to this, I propose to
revert this commit until all downsides of this change have been
investigated.
sileht added a commit to sileht/setuptools that referenced this issue Aug 2, 2016
This reverts commit 8579495.

As we can see on pypa#709,
this breaks many things (easy_install C extensions, all py3.5 tests,
run with LANG=C).

So instead of fixing in a hurry all new bugs due to this, I propose to
revert this commit until all downsides of this change have been
investigated.

Related bug: pypa#709
Related bug: pypa#710
Related bug: pypa#712
jaraco added a commit that referenced this issue Aug 2, 2016
Revert "Ensure that tmpdir is unicode. Fixes #704."
@jaraco jaraco reopened this Aug 2, 2016
jaraco added a commit that referenced this issue Aug 2, 2016
jaraco added a commit that referenced this issue Dec 18, 2016
@jaraco jaraco closed this in 53e5575 Dec 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.