[issue22862] os.walk fails on undecodable filenames

2014-11-13 Thread Florian Höch
Florian Höch added the comment: > I'm curious, which libraries? wxPython and wexpect (wexpect I could probably port myself, so the problem is mainly with wx) > Oh, I forgot to say that it's not possible to fix this issue in Python 2. > Backporting the PEP 383 in Python 2 requires deep changes

[issue22862] os.walk fails on undecodable filenames

2014-11-13 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-

[issue22862] os.walk fails on undecodable filenames

2014-11-13 Thread STINNER Victor
STINNER Victor added the comment: > 1) Is not yet possible for me unfortunately, some libraries I require are not > yet available for Python 3 (but in the long run, this would be my preferred > solution) I'm curious, which libraries? Oh, I forgot to say that it's not possible to fix this issu

[issue22862] os.walk fails on undecodable filenames

2014-11-13 Thread Florian Höch
Florian Höch added the comment: 1) Is not yet possible for me unfortunately, some libraries I require are not yet available for Python 3 (but in the long run, this would be my preferred solution) 2) Would necessitate too many changes in a carefully crafted, unicode-only application. I think I

[issue22862] os.walk fails on undecodable filenames

2014-11-13 Thread STINNER Victor
STINNER Victor added the comment: Your problem has two solutions. 1) Upgrade to Python 3 which handles correctly your use case (thanks to the PEP 383, surrogateescape error handler) 2) Only process filenames as bytes, and encode/decode manually (so you can decide how to handle undecodable fil

[issue22862] os.walk fails on undecodable filenames

2014-11-13 Thread Florian Höch
Florian Höch added the comment: This problem only affects Linux as far as I know (in my case I'm using Fedora 21 Beta). -- ___ Python tracker ___ ___

[issue22862] os.walk fails on undecodable filenames

2014-11-13 Thread STINNER Victor
STINNER Victor added the comment: What is your OS? -- components: +Unicode nosy: +ezio.melotti, haypo ___ Python tracker ___ ___ Pytho

[issue22862] os.walk fails on undecodable filenames

2014-11-13 Thread Florian Höch
New submission from Florian Höch: If 'top' is an unicode directory name, os.listdir can still return non-unicode filenames if they can't be decoded. This case is not handled in the Python 2.x standard library version of os.walk and will cause join(top, name) to fail on such filenames with an U