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

scenarios: add tests for Requires-Python #187

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

BurntSushi
Copy link
Member

This tests the interaction between Requires-Python and marker
expressions like python_version and python_full_version. In both of
these tests, the a dependency should be completely ignored because its
corresponding marker expression will never evaluate to true.

@BurntSushi BurntSushi requested a review from zanieb June 12, 2024 14:03
[root]
requires_python = ">=3.10"
requires = [
"a==1.0.0 ; python_full_version == '3.9b1'",
Copy link
Member

Choose a reason for hiding this comment

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

Should we be including the pre-release here? Seems like it complicates the scenario and we should have coverage for that separately.

Copy link
Member

@zanieb zanieb Jun 12, 2024

Choose a reason for hiding this comment

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

(I found it surprising that it was not the same as the python_version test)

Copy link
Member Author

Choose a reason for hiding this comment

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

The reason why I used it was because python_full_version specifically allows it. So it seemed nice to test that aspect of it. But I can see how it's potentially testing more than one thing. I can split this apart.

Copy link
Member Author

Choose a reason for hiding this comment

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

Okey dokey, fixed!

Copy link
Member

Choose a reason for hiding this comment

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

Ahh that makes sense. This seems better anyway. Thanks!

This tests the interaction between `Requires-Python` and marker
expressions like `python_version` and `python_full_version`. In both of
these tests, the `a` dependency should be completely ignored because its
corresponding marker expression will never evaluate to true.
@BurntSushi BurntSushi force-pushed the ag/universal-requires-python branch from 7ff0c37 to f559097 Compare June 12, 2024 14:11
@BurntSushi BurntSushi merged commit 421bba0 into main Jun 12, 2024
6 checks passed
@BurntSushi BurntSushi deleted the ag/universal-requires-python branch June 12, 2024 14:18
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.

2 participants