[Python-checkins] bpo-37478: Specify possible exceptions for os.chdir() (GH-14611) (GH-14629)

Terry Jan Reedy webhook-mailer at python.org
Sat Jul 6 22:18:53 EDT 2019


https://github.com/python/cpython/commit/4e6bfc4c605d92d2395fbcded9cf45cdd1ced810
commit: 4e6bfc4c605d92d2395fbcded9cf45cdd1ced810
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: Terry Jan Reedy <tjreedy at udel.edu>
date: 2019-07-06T22:18:50-04:00
summary:

bpo-37478: Specify possible exceptions for os.chdir() (GH-14611) (GH-14629)

(cherry picked from commit 0717b4d9b3899c5c2ca13031e4ff619a15a4d368)

Co-authored-by: Kyle Stanley <aeros167 at gmail.com>

files:
A Misc/NEWS.d/next/Documentation/2019-07-06-00-57-27.bpo-37478.B0ioLw.rst
M Doc/library/os.rst

diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index 6e8df88cf052..760c05c6e52d 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -1599,6 +1599,9 @@ features:
    This function can support :ref:`specifying a file descriptor <path_fd>`.  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



More information about the Python-checkins mailing list