[issue40368] os.path.realpath uppercases Windows drive letter on Python 3.8

2020-04-23 Thread Eryk Sun
Eryk Sun added the comment: > `os.path.abspath(".")` returned > `'c:\\Users\\Kagami\\Documents\\GitHub\\gecko-dev'`. > Should `ntpath.normpaoh` make the drive letter uppercase? ntpath.abspath and ntpath.normpath should preserve the input case for all components of a path because they don't

[issue40368] os.path.realpath uppercases Windows drive letter on Python 3.8

2020-04-23 Thread Kagami Sascha Rosylight
Kagami Sascha Rosylight added the comment: Should `ntpath.normpath` make the drive letter uppercase? -- ___ Python tracker ___ ___

[issue40368] os.path.realpath uppercases Windows drive letter on Python 3.8

2020-04-23 Thread Kagami Sascha Rosylight
Kagami Sascha Rosylight added the comment: I mentioned `os.path.abspath` because `os.path.abspath(".")` on console returned `'c:\\Users\\Kagami\\Documents\\GitHub\\gecko-dev'`. It seems this incompatibility is partially because MSYS shell prefers lowercase letter for Windows path while

[issue40368] os.path.realpath uppercases Windows drive letter on Python 3.8

2020-04-22 Thread Eryk Sun
Eryk Sun added the comment: > This behavior is inconsistent with `os.path.abspath` where it always > returns lowercased drive letter, ntpath.abspath calls GetFullPathNameW, which generally preserves the input case of the device/drive component. But it doesn't always preserve drive-letter

[issue40368] os.path.realpath uppercases Windows drive letter on Python 3.8

2020-04-22 Thread Kagami Sascha Rosylight
New submission from Kagami Sascha Rosylight : ``` $ python3.7 Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import os;os.path.realpath('c:/') 'c:\\' ``` ``` $