[New-bugs-announce] [issue21969] WindowsPath constructor does not check for invalid characters

Antony Lee report at bugs.python.org
Sun Jul 13 03:20:03 CEST 2014


New submission from Antony Lee:

PureWindowsPath("foo*") returns a path object, even though it is an invalid one (e.g., open("foo*") on Windows throws an OSError for "invalid argument" rather than a FileNotFoundError).  Given the amount of checking that is done in (e.g.) with_name and with_suffix, it seems reasonable to throw an exception in this case too.

----------
components: Library (Lib)
messages: 222899
nosy: Antony.Lee
priority: normal
severity: normal
status: open
title: WindowsPath constructor does not check for invalid characters
versions: Python 3.4, Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21969>
_______________________________________


More information about the New-bugs-announce mailing list