]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] Docs: Link to the `contextlib.chdir` context manager in the `os.chdir` docs...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 6 Jul 2026 15:49:04 +0000 (17:49 +0200)
committerGitHub <noreply@github.com>
Mon, 6 Jul 2026 15:49:04 +0000 (15:49 +0000)
(cherry picked from commit f155dbed4ef30dec5d00b8b09524b0d9f63965bc)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
Doc/library/os.rst

index a2179b6b5de0794c7fe0f060fc995f2d5e3b4339..71864278e706cd8d1db43e35fbf9eaed43d8e0b3 100644 (file)
@@ -2150,6 +2150,11 @@ features:
 
    .. audit-event:: os.chdir path os.chdir
 
+   .. seealso::
+
+      The :func:`contextlib.chdir` context manager, which changes the current
+      working directory on entering and restores the previous one on exit.
+
    .. versionchanged:: 3.3
       Added support for specifying *path* as a file descriptor
       on some platforms.