This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author neonene
Recipients eric.smith, neonene, paul.moore, steve.dower, tim.golden, zach.ware
Date 2022-01-13.13:30:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1642080657.92.0.951234319788.issue46362@roundup.psfhosted.org>
In-reply-to
Content
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:\COM9',
    r'C:\LPT1',
    r'C:\LPT2',
    r'C:\LPT3',
    r'C:\LPT9',
    r'C:\foo. . .',
]
for path in paths:
    print(os.path.abspath(path))

"""
3.11 before
    C:\CON
    C:\PRN
    C:\AUX
    C:\NUL
    C:\COM1
    C:\COM2
    C:\COM3
    C:\COM9
    C:\LPT1
    C:\LPT2
    C:\LPT3
    C:\LPT9
    C:\foo. . .

3.11 after
    \\.\CON
    \\.\PRN
    \\.\AUX
    \\.\NUL
    \\.\COM1
    \\.\COM2
    \\.\COM3
    \\.\COM9
    \\.\LPT1
    \\.\LPT2
    \\.\LPT3
    \\.\LPT9
    C:\foo

3.10.1
    \\.\CON
    \\.\PRN
    \\.\AUX
    \\.\NUL
    \\.\COM1
    \\.\COM2
    \\.\COM3
    \\.\COM9
    \\.\LPT1
    \\.\LPT2
    \\.\LPT3
    \\.\LPT9
    C:\foo
"""
History
Date User Action Args
2022-01-13 13:30:57neonenesetrecipients: + neonene, paul.moore, eric.smith, tim.golden, zach.ware, steve.dower
2022-01-13 13:30:57neonenesetmessageid: <1642080657.92.0.951234319788.issue46362@roundup.psfhosted.org>
2022-01-13 13:30:57neonenelinkissue46362 messages
2022-01-13 13:30:57neonenecreate