Skip to content

Commit 3390dbc

Browse files
committed
Clarify news
1 parent 5854d72 commit 3390dbc

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1-
:func:`os.path.realpath` now raises :exc:`NotADirectoryError` when *strict*
2-
mode is enabled and a non-directory path with a trailing slash is supplied.
1+
Fix issue where :func:`os.path.realpath` didn't raise :exc:`OSError` when
2+
given a non-directory path with a trailing slash in *strict* mode on POSIX.
3+
:func:`~os.path.realpath` now raises :exc:`NotADirectoryError` in this case,
4+
and whenever a non-directory path in a non-final position is resolved; for
5+
example, ``realpath("photo.jpg/spam", strict=True)`` now raises
6+
:exc:`NotADirectoryError` for ``"photo.jpg"`` rather than
7+
:exc:`FileNotFoundError` for ``"photo.jpg/spam"``.

0 commit comments

Comments
 (0)