forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[3.12] pythonGH-110488: Fix two small issues in `pathlib.PurePath.wit…
…h_name()` (pythonGH-110651) Ensure that `PurePath('foo/a').with_name('.')` raises `ValueError` Ensure that `PureWindowsPath('foo/a').with_name('a:b')` does not raise `ValueError`.. (cherry picked from commit b5f7777) Co-authored-by: Barney Gale <barney.gale@gmail.com>
- Loading branch information
1 parent
be381b5
commit 64e3774
Showing
3 changed files
with
15 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
Misc/NEWS.d/next/Library/2023-10-10-22-54-56.gh-issue-110488.2I7OiZ.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Fix a couple of issues in :meth:`pathlib.PurePath.with_name`: a single dot | ||
was incorrectly considered a valid name, and in :class:`PureWindowsPath`, a | ||
name with an NTFS alternate data stream, like ``a:b``, was incorrectly | ||
considered invalid. |