]> granicus.if.org Git - python/commit
bpo-33721: Make some os.path functions and pathlib.Path methods be tolerant to inval...
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 18 Sep 2018 08:28:51 +0000 (11:28 +0300)
committerGitHub <noreply@github.com>
Tue, 18 Sep 2018 08:28:51 +0000 (11:28 +0300)
commit0185f34ddcf07b78feb6ac666fbfd4615d26b028
treea27f02f0095d5a7fb1fcbd539114b3a74fb4fcc7
parent7bdf28265aa371b39f82dfc6562635801aff15a5
 bpo-33721: Make some os.path functions and pathlib.Path methods be tolerant to invalid paths.  (#7695)

Such functions as os.path.exists(), os.path.lexists(), os.path.isdir(),
os.path.isfile(), os.path.islink(), and os.path.ismount() now return False
instead of raising ValueError or its subclasses UnicodeEncodeError
and UnicodeDecodeError for paths that contain characters or bytes
unrepresentative at the OS level.
15 files changed:
Doc/library/os.path.rst
Doc/library/pathlib.rst
Doc/whatsnew/3.8.rst
Lib/genericpath.py
Lib/macpath.py
Lib/ntpath.py
Lib/pathlib.py
Lib/posixpath.py
Lib/test/test_genericpath.py
Lib/test/test_pathlib.py
Lib/test/test_posixpath.py
Lib/test/test_site.py
Misc/NEWS.d/next/Library/2018-06-14-17-53-30.bpo-33721.8i9_9A.rst [new file with mode: 0644]
Modules/clinic/posixmodule.c.h
Modules/posixmodule.c