summaryrefslogtreecommitdiffstats
path: root/Doc/library/os.path.rst
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-09-18 08:28:51 (GMT)
committerGitHub <noreply@github.com>2018-09-18 08:28:51 (GMT)
commit0185f34ddcf07b78feb6ac666fbfd4615d26b028 (patch)
treea27f02f0095d5a7fb1fcbd539114b3a74fb4fcc7 /Doc/library/os.path.rst
parent7bdf28265aa371b39f82dfc6562635801aff15a5 (diff)
downloadcpython-0185f34ddcf07b78feb6ac666fbfd4615d26b028.zip
cpython-0185f34ddcf07b78feb6ac666fbfd4615d26b028.tar.gz
cpython-0185f34ddcf07b78feb6ac666fbfd4615d26b028.tar.bz2
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.
Diffstat (limited to 'Doc/library/os.path.rst')
-rw-r--r--Doc/library/os.path.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/library/os.path.rst b/Doc/library/os.path.rst
index 36bb21c..5a0b178 100644
--- a/Doc/library/os.path.rst
+++ b/Doc/library/os.path.rst
@@ -55,6 +55,14 @@ the :mod:`glob` module.)
* :mod:`macpath` for old-style MacOS paths
+.. versionchanged:: 3.8
+
+ :func:`exists`, :func:`lexists`, :func:`isdir`, :func:`isfile`,
+ :func:`islink`, and :func:`ismount` now return ``False`` instead of
+ raising an exception for paths that contain characters or bytes
+ unrepresentable at the OS level.
+
+
.. function:: abspath(path)
Return a normalized absolutized version of the pathname *path*. On most