[New-bugs-announce] [issue44403] Add os.path.isreserved() function
Barney Gale
report at bugs.python.org
Sat Jun 12 15:52:47 EDT 2021
New submission from Barney Gale <barney.gale at gmail.com>:
Windows reserves certain filenames like 'NUL'. Checking for these names is part of a small handful of functionality that is available in pathlib but not in os.path.
I propose that we add an os.path.isreserved() function, encorporating Eryk Sun's work on bpo-27827. We then adjust pathlib to call the new function.
By doing so, we move one of the few remaining OS-specific implementations in pathlib to low-level libraries (posixpath, ntpath) where it arguably belongs.
We also make this functionality available to the segment of people using traditional string-based path operations who don't want to dip their toes into pathlib just for reserved names.
----------
components: Library (Lib)
messages: 395702
nosy: barneygale
priority: normal
severity: normal
status: open
title: Add os.path.isreserved() function
type: enhancement
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44403>
_______________________________________
More information about the New-bugs-announce
mailing list