Author vstinner
Recipients CristiFati, eryksun, lars.gustaebel, paul.moore, steve.dower, tim.golden, vstinner, zach.ware
Date 2020-10-06.11:06:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1601982371.81.0.961183496962.issue36534@roundup.psfhosted.org>
In-reply-to
Content
> Also, while _sanitize_windows_name() handles trailing dots, for some reason it overlooks trailing spaces. It also doesn't handle reserved DOS device names.

The pathlib module has _WindowsFlavour.reserved_names list of Windows
reserved names:

>>> pprint.pprint(sorted(pathlib._WindowsFlavour.reserved_names))
['AUX',
 'COM1',
 'COM2',
 'COM3',
 'COM4',
 'COM5',
 'COM6',
 'COM7',
 'COM8',
 'COM9',
 'CON',
 'LPT1',
 'LPT2',
 'LPT3',
 'LPT4',
 'LPT5',
 'LPT6',
 'LPT7',
 'LPT8',
 'LPT9',
 'NUL',
 'PRN']
History
Date User Action Args
2020-10-06 11:06:12vstinnersetrecipients: + vstinner, paul.moore, lars.gustaebel, tim.golden, zach.ware, eryksun, steve.dower, CristiFati
2020-10-06 11:06:11vstinnersetmessageid: <1601982371.81.0.961183496962.issue36534@roundup.psfhosted.org>
2020-10-06 11:06:11vstinnerlinkissue36534 messages
2020-10-06 11:06:11vstinnercreate