File tree Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -411,6 +411,8 @@ the :mod:`glob` module.)
411411 If a path doesn't exist or a symlink loop is encountered, and *strict * is
412412 ``True ``, :exc: `OSError ` is raised. If *strict * is ``False `` these errors
413413 are ignored, and so the result might be missing or otherwise inaccessible.
414+ If *strict * is :data: `ALL_BUT_LAST `, the last component of the path
415+ might be missing, but other errors are not ignored.
414416
415417 .. note ::
416418 This function emulates the operating system's procedure for making a path
@@ -429,6 +431,16 @@ the :mod:`glob` module.)
429431 .. versionchanged :: 3.10
430432 The *strict * parameter was added.
431433
434+ .. versionchanged :: next
435+ Support for :data: `ALL_BUT_LAST ` was added.
436+
437+
438+ .. data :: ALL_BUT_LAST
439+
440+ Special value used for *strict * in :func: `realpath `.
441+
442+ .. versionadded :: next
443+
432444
433445.. function :: relpath(path, start=os.curdir)
434446
Original file line number Diff line number Diff line change @@ -89,6 +89,12 @@ New modules
8989Improved modules
9090================
9191
92+ os.path
93+ -------
94+
95+ * Add support of the all-but-last mode in :func: `~os.path.realpath `.
96+ (Contributed by Serhiy Storchaka in :gh: `71189 `.)
97+
9298ssl
9399---
94100
Original file line number Diff line number Diff line change 1+ Add support of the all-but-last mode in :func: `os.path.realpath `.
You can’t perform that action at this time.
0 commit comments