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

Requirement parsing handles local non-dist files. #1190

Merged
merged 1 commit into from
Jan 22, 2021

Conversation

jsirois
Copy link
Member

@jsirois jsirois commented Jan 22, 2021

Previously a file (not directory) in the CWD with the same name as the
project name of a requirement being resolved would lead to an error.
Modify the requirement parsing stress test to cause this error and fix
parsing so the test passes.

Fixes #1188

Previously a file (not directory) in the CWD with the same name as the
project name of a requirement being resolved would lead to an error.
Modify the requirement parsing stress test to cause this error and fix
parsing so the test passes.

Fixes pex-tool#1188
Comment on lines +313 to +315
# Ensure local non-distribution files matching distribution names are not erroneously probed
# as distributions to find name and version metadata.
touch("nose")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing I appreciate about your PEX tests is explicitly mentioning the motivating issue in things like test names. Consider adding a link to the issue in this comment.

(Not a huge deal - Git history will trace it back.)

Copy link
Member Author

@jsirois jsirois Jan 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah - its a cheap / sneaky / convenient / lazy test. Agreed about git history though. Now that the black reformat is past, git blame is pretty useful for exactly this.

@jsirois jsirois merged commit eec3591 into pex-tool:master Jan 22, 2021
@jsirois jsirois deleted the issues/1188 branch January 22, 2021 01:04
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.

Pex requirement parsing is tripped up by files in the CWD with the same name as requirements' project names.
2 participants