From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Mon, 6 Jul 2026 15:49:04 +0000 (+0200) Subject: [3.14] Docs: Link to the `contextlib.chdir` context manager in the `os.chdir` docs... X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=40771bf1749c254e9ba795a456f31739d5005b2b;p=thirdparty%2FPython%2Fcpython.git [3.14] Docs: Link to the `contextlib.chdir` context manager in the `os.chdir` docs (GH-153152) (#153213) (cherry picked from commit f155dbed4ef30dec5d00b8b09524b0d9f63965bc) Co-authored-by: Cody Maloney Co-authored-by: Stan Ulbrych --- diff --git a/Doc/library/os.rst b/Doc/library/os.rst index a2179b6b5de0..71864278e706 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -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.