]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-43757: Document os.path.realpath(strict=True) in 3.10 whatsnew. (GH-26090) (...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 14 May 2021 05:24:13 +0000 (22:24 -0700)
committerGitHub <noreply@github.com>
Fri, 14 May 2021 05:24:13 +0000 (22:24 -0700)
(cherry picked from commit d1560d2429dff8e7d397801786e966dd33bb1bd7)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
Co-authored-by: Barney Gale <barney.gale@gmail.com>
Doc/whatsnew/3.10.rst

index 8fd64f86b3a2f58e560edbdb5ceae0197bb52af5..9394ee7d6223ba4f64623b8cfbc9bb6df9740c04 100644 (file)
@@ -1089,6 +1089,14 @@ Add :data:`~os.O_EVTONLY`, :data:`~os.O_FSYNC`, :data:`~os.O_SYMLINK`
 and :data:`~os.O_NOFOLLOW_ANY` for macOS.
 (Contributed by Dong-hee Na in :issue:`43106`.)
 
+os.path
+-------
+
+:func:`os.path.realpath` now accepts a *strict* keyword-only argument. When set
+to ``True``, :exc:`OSError` is raised if a path doesn't exist or a symlink loop
+is encountered.
+(Contributed by Barney Gale in :issue:`43757`.)
+
 pathlib
 -------