Skip to content
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

Fix NameError when handling InvalidRequirement in install_req_from_req_string #6419

Merged

Conversation

@rouge8
Copy link
Contributor

@rouge8 rouge8 commented Apr 18, 2019

Previously, an InvalidRequirement would raise a NameError while trying to raise an InstallationError because req was not defined.

Discovered while working on #6402.

…q_string

Previously, an InvalidRequirement would raise a NameError while trying
to raise an InstallationError because `req` was not defined.

Discovered while working on pypa#6402.
@rouge8
Copy link
Contributor Author

@rouge8 rouge8 commented Apr 18, 2019

@cjerdonek should I add a news file for this? It feels trivial since there are no open issues for it and I only caught it by accident while writing tests for other parts of that function.

Loading

@cjerdonek
Copy link
Member

@cjerdonek cjerdonek commented Apr 18, 2019

Yes, I think so. The bugfix number can reference the PR directly.

Loading

@rouge8
Copy link
Contributor Author

@rouge8 rouge8 commented Apr 18, 2019

Yes, I think so. The bugfix number can reference the PR directly.

Done

Loading

Copy link
Member

@cjerdonek cjerdonek left a comment

Thanks! A couple comments.

Loading

tests/unit/test_req_install.py Show resolved Hide resolved
Loading
news/6419.bugfix Outdated Show resolved Hide resolved
Loading
@rouge8 rouge8 force-pushed the fix-install-req-from-string-invalidrequirement branch from ceaafa5 to 5d14f3b Apr 19, 2019
@cjerdonek cjerdonek force-pushed the fix-install-req-from-string-invalidrequirement branch from 5d14f3b to 3ec256d Apr 19, 2019
@cjerdonek cjerdonek force-pushed the fix-install-req-from-string-invalidrequirement branch from 3ec256d to c6036b7 Apr 19, 2019
@cjerdonek cjerdonek merged commit bb14ff4 into pypa:master Apr 19, 2019
29 checks passed
Loading
@cjerdonek
Copy link
Member

@cjerdonek cjerdonek commented Apr 19, 2019

Thanks again, @rouge8! 👍

(Note that I made a couple super tiny formatting-like tweaks before merging.)

Loading

@lock
Copy link

@lock lock bot commented May 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Loading

@lock lock bot added the S: auto-locked label May 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators May 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants