[issue46362] os.path.abspath() needs more normalization on Windows

2022-01-14 Thread Steve Dower
Steve Dower added the comment: New changeset 71c0b859ae16ee748cbb050a1f4de93c04e04f83 by neonene in branch 'main': bpo-46362: Ensure abspath() tests pass through environment variables to subprocess (GH-30595) https://github.com/python/cpython/commit/71c0b859ae16ee748cbb050a1f4de93c04e04f83

[issue46362] os.path.abspath() needs more normalization on Windows

2022-01-14 Thread neonene
Change by neonene : -- pull_requests: +28793 pull_request: https://github.com/python/cpython/pull/30595 ___ Python tracker ___ ___ P

[issue46362] os.path.abspath() needs more normalization on Windows

2022-01-13 Thread Steve Dower
Steve Dower added the comment: Thanks for the patch! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue46362] os.path.abspath() needs more normalization on Windows

2022-01-13 Thread Steve Dower
Steve Dower added the comment: New changeset d4e64cd4b0ea431d4e371f9b0a25f6b75a069dc1 by neonene in branch 'main': bpo-46362: Ensure ntpath.abspath() uses the Windows API correctly (GH-30571) https://github.com/python/cpython/commit/d4e64cd4b0ea431d4e371f9b0a25f6b75a069dc1 -- _

[issue46362] os.path.abspath() needs more normalization on Windows

2022-01-13 Thread Steve Dower
Steve Dower added the comment: One thing to be aware of is that Windows 11 has changed the rules around these files, so here's my results with 3.10: >>> for path in paths: ... print(os.path.abspath(path)) ... C:\CON C:\PRN C:\AUX \\.\NUL C:\COM1 C:\COM2 C:\COM3 C:\COM9 C:\LPT1 C:\LPT2 C:\

[issue46362] os.path.abspath() needs more normalization on Windows

2022-01-13 Thread neonene
neonene added the comment: Basically, PR30571 aims for compatibility with 3.10 and earlier. Using Windows API is the easiest and the same way as them: import os.path paths = [ r'C:\CON', r'C:\PRN', r'C:\AUX', r'C:\NUL', r'C:\COM1', r'C:\COM2', r'C:\COM3', r'C:\

[issue46362] os.path.abspath() needs more normalization on Windows

2022-01-13 Thread Eric V. Smith
Eric V. Smith added the comment: Can you show various paths, before and after your change? It’s not clear to me what you’re proposing to change. -- nosy: +eric.smith ___ Python tracker __

[issue46362] os.path.abspath() needs more normalization on Windows

2022-01-12 Thread neonene
Change by neonene : -- keywords: +patch pull_requests: +28772 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30571 ___ Python tracker ___

[issue46362] os.path.abspath() needs more normalization on Windows

2022-01-12 Thread neonene
New submission from neonene : 3.11a3+ introduced the C version of abspath(), which shows incompletely normalized absolute path (see msg410068): >>> os.path.abspath(r'\\spam\\eggs. . .') 'spameggs. . .' >>> os.path.abspath('C:\\spam. . .') 'C:\\spam. . .' >>> os.path