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 <>
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.
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: <>
2015-11-28 15:56:25eryksunlinkissue25758 messages
2015-11-28 15:56:25eryksuncreate