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 Antony.Lee
Recipients Antony.Lee, pitrou
Date 2014-07-13.04:24:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1405225446.49.0.843686390564.issue21969@psf.upfronthosting.co.za>
In-reply-to
Content
There is a list of always forbidden characters (http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#naming_conventions), and then a couple of obscure fs-dependent cases (http://en.wikipedia.org/wiki/Comparison_of_file_systems) but I believe excluding the main list should be enough for most purposes.
Note that PosixPath is not immune to this either, as there is one forbidden character: the null byte.

I would prefer if path.open() can only raise one of the OSError subclasses that correspond to errnos mentioned in "man 2 open".  Currently, on Windows, "Path('*').open()" raises an OSError ("invalid argument"); on Linux, "Path('\0').open()" raises a TypeError(!).
History
Date User Action Args
2014-07-13 04:24:06Antony.Leesetrecipients: + Antony.Lee, pitrou
2014-07-13 04:24:06Antony.Leesetmessageid: <1405225446.49.0.843686390564.issue21969@psf.upfronthosting.co.za>
2014-07-13 04:24:06Antony.Leelinkissue21969 messages
2014-07-13 04:24:05Antony.Leecreate