This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients Dima.Tisnek, Marcus.Smith, brett.cannon, dstufft, eric.snow, eryksun, ezio.melotti, ncoghlan, paul.moore, steve.dower, tim.golden, vstinner, zach.ware
Date 2015-11-28.15:56:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1448726185.96.0.395207806636.issue25758@psf.upfronthosting.co.za>
In-reply-to
Content
The problem is that the compile_source function in Modules/zipimport.c calls PyUnicode_EncodeFSDefault to get an encoded string to pass as the filename argument of Py_CompileString. On Windows this uses the ANSI codepage (i.e. 'mbcs'). Apparently your system's ANSI codepage doesn't map the "Ł" character. 

I reproduced the problem more simply by copying pip-7.1.2-py2.py3-none-any.whl to a subdirectory named "Łukasz"; adding the wheel path to sys.path; and attempting to execute "import pip". 

One solution is to replace Py_CompileString with Py_CompileStringObject. This way compile_source doesn't have to worry about encoding its pathname argument. A minimal patch is attached, but it needs a test.
History
Date User Action Args
2015-11-28 15:56:26eryksunsetrecipients: + eryksun, brett.cannon, paul.moore, ncoghlan, vstinner, tim.golden, ezio.melotti, eric.snow, Dima.Tisnek, zach.ware, steve.dower, dstufft, Marcus.Smith
2015-11-28 15:56:25eryksunsetmessageid: <1448726185.96.0.395207806636.issue25758@psf.upfronthosting.co.za>
2015-11-28 15:56:25eryksunlinkissue25758 messages
2015-11-28 15:56:25eryksuncreate