Author eryksun
Recipients eryksun, ezio.melotti, paul.moore, steve.dower, tim.golden, vstinner, zach.ware
Date 2018-02-23.06:44:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1519368268.76.0.467229070634.issue32920@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2018-02-23 06:44:28eryksunsetrecipients: + eryksun, paul.moore, vstinner, tim.golden, ezio.melotti, zach.ware, steve.dower
2018-02-23 06:44:28eryksunsetmessageid: <1519368268.76.0.467229070634.issue32920@psf.upfronthosting.co.za>
2018-02-23 06:44:28eryksunlinkissue32920 messages
2018-02-23 06:44:27eryksuncreate