From 1094492fde7e3346079fc714fa79dd6fd625c9e4 Mon Sep 17 00:00:00 2001 From: Kyle Stanley Date: Fri, 5 Jul 2019 16:59:39 -0400 Subject: [PATCH 1/8] Add possible exceptions to os.chdir() --- Doc/library/os.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Doc/library/os.rst b/Doc/library/os.rst index ee3c35c2a9987c..dd4089bd8c9feb 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -1598,6 +1598,9 @@ features: This function can support :ref:`specifying a file descriptor `. The descriptor must refer to an opened directory, not an open file. + + This method can raise :exc:`OSError`, such as :exc:`FileNotFoundError` and + :exc:`NotADirectoryError`. .. versionadded:: 3.3 Added support for specifying *path* as a file descriptor From 478094226285bb9bca8ca67289acb22ad4553ca1 Mon Sep 17 00:00:00 2001 From: Kyle Stanley Date: Fri, 5 Jul 2019 17:06:02 -0400 Subject: [PATCH 2/8] "method" to "function" --- Doc/library/os.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/os.rst b/Doc/library/os.rst index dd4089bd8c9feb..7c0e95d9d8dd73 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -1599,7 +1599,7 @@ features: This function can support :ref:`specifying a file descriptor `. The descriptor must refer to an opened directory, not an open file. - This method can raise :exc:`OSError`, such as :exc:`FileNotFoundError` and + This function can raise :exc:`OSError`, such as :exc:`FileNotFoundError` and :exc:`NotADirectoryError`. .. versionadded:: 3.3 From c0beb06bd6d59e75814582bdf29e4f938184a50e Mon Sep 17 00:00:00 2001 From: Kyle Stanley Date: Fri, 5 Jul 2019 20:55:07 -0400 Subject: [PATCH 3/8] Removed added whitespace Whitespace added after new section was causing the document tests to fail, this should fix it. --- Doc/library/os.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/os.rst b/Doc/library/os.rst index 7c0e95d9d8dd73..8709b43950626a 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -1598,7 +1598,7 @@ 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`, such as :exc:`FileNotFoundError` and :exc:`NotADirectoryError`. From acbddb7b84a37fcaa795b9c4bd06a2b7da8cee12 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Sat, 6 Jul 2019 00:57:27 +0000 Subject: [PATCH 4/8] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../next/Documentation/2019-07-06-00-57-27.bpo-37478.B0ioLw.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Documentation/2019-07-06-00-57-27.bpo-37478.B0ioLw.rst 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 00000000000000..55b136621762da --- /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 From f1e3533974da1045ff00eef0883ff2524b5eeef2 Mon Sep 17 00:00:00 2001 From: Kyle Stanley Date: Fri, 5 Jul 2019 21:18:51 -0400 Subject: [PATCH 5/8] Whitespace fix Removed double space between a period and the next sentence on line 1599. --- Doc/library/os.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/os.rst b/Doc/library/os.rst index 8709b43950626a..fa476462700cc6 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -1596,7 +1596,7 @@ features: Change the current working directory to *path*. - This function can support :ref:`specifying a file descriptor `. The + 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`, such as :exc:`FileNotFoundError` and From 7e4953ff76106c889207ed5973b3d9dfc26ab402 Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Sat, 6 Jul 2019 17:34:49 -0400 Subject: [PATCH 6/8] Update os.rst --- Doc/library/os.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/os.rst b/Doc/library/os.rst index fa476462700cc6..71e148722b8fdb 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -1599,8 +1599,8 @@ 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`, such as :exc:`FileNotFoundError` and - :exc:`NotADirectoryError`. + 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 From 8b515b3f2a1522fd5ad8fb793d9fde0db67d4bdf Mon Sep 17 00:00:00 2001 From: Kyle Stanley Date: Sat, 6 Jul 2019 18:57:50 -0400 Subject: [PATCH 7/8] Fix exception tag Where ``NotADirectoryError`` was added to the docs for os.chdir(), there was a missing ``:`` behind ``exc:`` --- Doc/library/os.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/os.rst b/Doc/library/os.rst index 71e148722b8fdb..58e030c53e1bc2 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -1600,7 +1600,7 @@ features: 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`. + :exc:`FileNotFoundError`, :exc:`PermissionError`, and :exc:`NotADirectoryError`. .. versionadded:: 3.3 Added support for specifying *path* as a file descriptor From 4b65eeb4b03eef96254a9827793e474b18e2dfa2 Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Sat, 6 Jul 2019 21:12:57 -0400 Subject: [PATCH 8/8] add space back and trigger retest --- Doc/library/os.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/os.rst b/Doc/library/os.rst index 58e030c53e1bc2..19dc35c84fdc69 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -1596,7 +1596,7 @@ features: Change the current working directory to *path*. - This function can support :ref:`specifying a file descriptor `. The + 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