-
-
Notifications
You must be signed in to change notification settings - Fork 32k
bpo-34182: Fix test_pydoc running as a script #8389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Running the test with the following command line still failed. $ ./python Lib/test/./test_pydoc.py |
OK, I moved the |
Lib/test/test_pydoc.py
Outdated
dirname = os.path.dirname | ||
basedir = dirname(dirname(__file__)) | ||
basedir = (dirname(dirname(abspath(__file__)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant parenthesis.
Thanks @bbayles for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 2.7, 3.6, 3.7. |
(cherry picked from commit 4e11c46) Co-authored-by: Bo Bayles <[email protected]>
GH-8557 is a backport of this pull request to the 3.7 branch. |
Sorry, @bbayles and @serhiy-storchaka, I could not cleanly backport this to |
Sorry, @bbayles and @serhiy-storchaka, I could not cleanly backport this to |
I don't think the backport is necessary for 3.6 or 2.7. They both use The issue was introduced in ebfaa71 in 2017. I think leaving 3.6 and 2.7 as they are leaves them vulnerable to 32031, however. Should I move this fix to those branches, or not bother? |
This is not very important issue in any case. |
(cherry picked from commit 4e11c46) Co-authored-by: Bo Bayles <[email protected]>
Thank you for your PR! |
This PR fixes running
test_pydoc
as a module. The issue was that this line was returningLib
instead of/path/to/Lib
.https://bugs.python.org/issue34182