From: Cody Maloney Date: Mon, 6 Jul 2026 15:40:45 +0000 (-0700) Subject: Docs: Link to the `contextlib.chdir` context manager in the `os.chdir` docs (#153152) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f155dbed4ef30dec5d00b8b09524b0d9f63965bc;p=thirdparty%2FPython%2Fcpython.git Docs: Link to the `contextlib.chdir` context manager in the `os.chdir` docs (#153152) Co-authored-by: Stan Ulbrych --- diff --git a/Doc/library/os.rst b/Doc/library/os.rst index 7b043f257ca0..6331ba4a034c 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -2180,6 +2180,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.