[issue24672] shutil.rmtree fails on non ascii filenames

2016-12-21 Thread Jason R. Coombs
Jason R. Coombs added the comment: In https://github.com/pypa/setuptools/issues/706, I've addressed this additional concern. -- resolution: -> wont fix status: open -> closed ___ Python tracker

[issue24672] shutil.rmtree fails on non ascii filenames

2016-12-20 Thread Steve Dower
Steve Dower added the comment: Lib/posixpath.py needs a huge amount of work to behave correctly for either bytes or Unicode paths. I don't know why Lib/ntpath.py is okay here, but the code is different so I suspect it just happens to not need the same conversion. Switching for each platform

[issue24672] shutil.rmtree fails on non ascii filenames

2016-12-20 Thread Jason R. Coombs
Jason R. Coombs added the comment: I'm afraid I need to re-open this issue. Although passing unicode names to rmtree fixes the issue on Windows systems, it causes problems on Linux systems where LC_ALL=C. Consider this script: # # encoding: utf-8 from

[issue24672] shutil.rmtree fails on non ascii filenames

2016-07-30 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> wont fix stage: -> resolved status: open -> closed versions: -Python 3.5, Python 3.6 ___ Python tracker

[issue24672] shutil.rmtree fails on non ascii filenames

2016-07-30 Thread Jason R. Coombs
Jason R. Coombs added the comment: I agree. I was able to apply a fairly simple fix to setuptools to address the failure (https://github.com/pypa/setuptools/commit/857949575022946cc60c7cd1d0d088246d3f7540). I suggest closing this ticket as won't fix. --

[issue24672] shutil.rmtree fails on non ascii filenames

2016-07-30 Thread STINNER Victor
STINNER Victor added the comment: Use Unicode on Python 3, it will work on all platforms. Problem solved :-) -- ___ Python tracker ___

[issue24672] shutil.rmtree fails on non ascii filenames

2016-07-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue16700. On Windows there are two sets of API: Unicode and bytes. File names are stored in Unicode (UTF-16) in modern filesystems and encoded to bytes by system for bytes API. Unfortunately this encoding is lossfull. Windows try to find the

[issue24672] shutil.rmtree fails on non ascii filenames

2016-07-29 Thread Jason R. Coombs
Jason R. Coombs added the comment: I've confirmed the issue. It does indeed only occur if the string passed to rmtree is bytes. I discovered this during my investigation of https://github.com/cherrypy/cherrypy/issues/1467. The following script will replicate the failure on Windows systems on