[proxy] github.com← back | site home | direct (HTTPS) ↗ | proxy home | ◑ dark◐ light
/ cpython Public

Conversation

Copy link
Contributor

miss-islington commented Apr 15, 2018

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.
(cherry picked from commit 82a9481)

Co-authored-by: Nick Coghlan ncoghlan@gmail.com

https://bugs.python.org/issue33185

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.
(cherry picked from commit 82a9481)

Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
Copy link
Contributor Author

@ncoghlan: Backport status check is done, and it's a success ✅ .

miss-islington merged commit d7ffa58 into python:3.7 Apr 15, 2018
Copy link
Contributor Author

Thanks!

miss-islington deleted the backport-82a9481-3.7 branch April 15, 2018 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants