summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew/3.7.rst
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2018-04-15 11:52:57 (GMT)
committerGitHub <noreply@github.com>2018-04-15 11:52:57 (GMT)
commit82a948105920100ca2ec5c2340bc3890adcfe778 (patch)
treeb6ed9b9402c0e83386082933015b706e58db40d7 /Doc/whatsnew/3.7.rst
parent480ab05d5fee2b8fa161f799af33086a4e68c7dd (diff)
downloadcpython-82a948105920100ca2ec5c2340bc3890adcfe778.zip
cpython-82a948105920100ca2ec5c2340bc3890adcfe778.tar.gz
cpython-82a948105920100ca2ec5c2340bc3890adcfe778.tar.bz2
bpo-33185: Fix regression in pydoc CLI sys.path handling (GH-6419)
The pydoc CLI assumed -m pydoc would add the empty string to sys.path, and hence got confused when it switched to adding the full initial working directory instead. This refactors the pydoc CLI path manipulation to be more testable, and ensures it won't accidentally remove the standard library directory containing pydoc itself from sys.path.
Diffstat (limited to 'Doc/whatsnew/3.7.rst')
-rw-r--r--Doc/whatsnew/3.7.rst7
1 files changed, 4 insertions, 3 deletions
diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst
index 1f52488..81df398 100644
--- a/Doc/whatsnew/3.7.rst
+++ b/Doc/whatsnew/3.7.rst
@@ -1145,9 +1145,10 @@ Changes in Python behavior
(Contributed by Serhiy Storchaka in :issue:`32012` and :issue:`32023`.)
* When using the ``-m`` switch, the starting directory is now added to sys.path,
- rather than the current working directory. Any programs that are found to be
- relying on the previous behaviour will need to be updated to manipulate
- :data:`sys.path` appropriately.
+ rather than the current working directory. Any programs that are checking for
+ the empty string in :data:`sys.path`, or otherwise relying on the previous
+ behaviour, will need to be updated accordingly (e.g. by checking for
+ ``os.getcwd()`` in addition to checking for the empty string).
Changes in the Python API