From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sun, 7 Jul 2019 02:19:08 +0000 (-0700) Subject: bpo-37478: Specify possible exceptions for os.chdir() (GH-14611) (GH-14630) X-Git-Tag: v3.7.5rc1~265 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1dd65075955337183ba2f78cb11a1eec2466dc74;p=thirdparty%2FPython%2Fcpython.git bpo-37478: Specify possible exceptions for os.chdir() (GH-14611) (GH-14630) (cherry picked from commit 0717b4d9b3899c5c2ca13031e4ff619a15a4d368) Co-authored-by: Kyle Stanley --- diff --git a/Doc/library/os.rst b/Doc/library/os.rst index 63d118d40f9a..856ef2b2dbe4 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -1566,6 +1566,9 @@ features: This function can support :ref:`specifying a file descriptor `. The descriptor must refer to an opened directory, not an open file. + This function can raise :exc:`OSError` subclasses such as + :exc:`FileNotFoundError`, :exc:`PermissionError`, and :exc:`NotADirectoryError`. + .. versionadded:: 3.3 Added support for specifying *path* as a file descriptor on some platforms. diff --git a/Misc/NEWS.d/next/Documentation/2019-07-06-00-57-27.bpo-37478.B0ioLw.rst b/Misc/NEWS.d/next/Documentation/2019-07-06-00-57-27.bpo-37478.B0ioLw.rst new file mode 100644 index 000000000000..55b136621762 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2019-07-06-00-57-27.bpo-37478.B0ioLw.rst @@ -0,0 +1 @@ +Added possible exceptions to the description of os.chdir(). \ No newline at end of file