Message312620
When reviewing issue 32904 I noticed that os.getcwdb still calls the CRT _getcwd function. Apparently this was overlooked when implementing PEP 529. For example:
>>> os.getcwd()
'C:\\Temp\\Lang\\αβγδ'
>>> os.getcwdb()
b'C:\\Temp\\Lang\\a\xdf?d'
Not only is the encoding wrong, but because the CRT uses GetFullPathNameA (the CRT's implementation of _getcwd is convoluted, IMO), the call fails if the current directory exceeds MAX_PATH. Python 3.6+ on Windows 10 otherwise supports long paths. |
|
Date |
User |
Action |
Args |
2018-02-23 06:44:28 | eryksun | set | recipients:
+ eryksun, paul.moore, vstinner, tim.golden, ezio.melotti, zach.ware, steve.dower |
2018-02-23 06:44:28 | eryksun | set | messageid: <1519368268.76.0.467229070634.issue32920@psf.upfronthosting.co.za> |
2018-02-23 06:44:28 | eryksun | link | issue32920 messages |
2018-02-23 06:44:27 | eryksun | create | |
|