-
Notifications
You must be signed in to change notification settings - Fork 760
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
Respect Requires-Python
in universal resolution
#3998
Conversation
ab5834d
to
823f9a1
Compare
823f9a1
to
c62267b
Compare
c62267b
to
a45ef53
Compare
7b4b18b
to
cd1fb38
Compare
----- stderr ----- | ||
warning: `uv lock` is experimental and may change without warning. | ||
× No solution found when resolving dependencies: | ||
╰─▶ Because the requested Python version (>=3.7) does not satisfy Python>=3.8 and the requested Python version (>=3.7) does not satisfy Python>=3.7.9,<3.8, we can conclude that Python>=3.7.9 are incompatible. |
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.
Not a particularly clear message but it's roughly the same as echo "pygls>=1.1.0" | cargo run pip compile --python-version 3.7 -
before any of my changes.
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.
Here's Poetry:
The current project's Python requirement (>=3.7) is not compatible with some of the required packages Python requirement:
- pygls requires Python >=3.7.9,<4, so it will not be satisfied for Python >=3.7,<3.7.9 || >=4
- pygls requires Python >=3.7.9,<4, so it will not be satisfied for Python >=3.7,<3.7.9 || >=4
- pygls requires Python >=3.7.9,<4, so it will not be satisfied for Python >=3.7,<3.7.9 || >=4
- pygls requires Python >=3.7.9,<4, so it will not be satisfied for Python >=3.7,<3.7.9 || >=4
- pygls requires Python >=3.7.9,<4, so it will not be satisfied for Python >=3.7,<3.7.9 || >=4
- pygls requires Python >=3.8, so it will not be satisfied for Python >=3.7,<3.8
- pygls requires Python >=3.8, so it will not be satisfied for Python >=3.7,<3.8
Because no versions of pygls match >1.1.0,<1.1.1 || >1.1.1,<1.1.2 || >1.1.2,<1.2.0 || >1.2.0,<1.2.1 || >1.2.1,<1.3.0 || >1.3.0,<1.3.1 || >1.3.1
and pygls (1.1.0) requires Python >=3.7.9,<4, pygls is forbidden.
And because pygls (1.1.1) requires Python >=3.7.9,<4, pygls is forbidden.
And because pygls (1.1.2) requires Python >=3.7.9,<4
and pygls (1.2.0) requires Python >=3.7.9,<4, pygls is forbidden.
And because pygls (1.2.1) requires Python >=3.7.9,<4
and pygls (1.3.0) requires Python >=3.8, pygls is forbidden.
So, because pygls (1.3.1) requires Python >=3.8
and poetry-test depends on pygls (>=1.1.0), version solving failed.
• Check your dependencies Python requirement: The Python requirement can be specified via the `python` or `markers` properties
For pygls, a possible solution would be to set the `python` property to ">=3.7.9,<4"
For pygls, a possible solution would be to set the `python` property to ">=3.7.9,<4"
For pygls, a possible solution would be to set the `python` property to ">=3.7.9,<4"
For pygls, a possible solution would be to set the `python` property to ">=3.7.9,<4"
For pygls, a possible solution would be to set the `python` property to ">=3.7.9,<4"
For pygls, a possible solution would be to set the `python` property to ">=3.8"
For pygls, a possible solution would be to set the `python` property to ">=3.8"
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.
We should add a hint here that "requested Python version" refers to the version you declared in your pyproject.toml and that - unlike everything else - that version needs to stricter than the one in your dependencies.
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.
Will do in a separate PR.
match self { | ||
RequiresPython::Specifier(specifier) => requires_python.contains(specifier), | ||
RequiresPython::Specifiers(specifiers) => { | ||
let Ok(target) = specifiers |
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.
Added the missing try_from conversion method for that in #4010
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.
Thx.
----- stderr ----- | ||
warning: `uv lock` is experimental and may change without warning. | ||
× No solution found when resolving dependencies: | ||
╰─▶ Because the requested Python version (>=3.7) does not satisfy Python>=3.8 and the requested Python version (>=3.7) does not satisfy Python>=3.7.9,<3.8, we can conclude that Python>=3.7.9 are incompatible. |
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.
We should add a hint here that "requested Python version" refers to the version you declared in your pyproject.toml and that - unlike everything else - that version needs to stricter than the one in your dependencies.
cd1fb38
to
6c0f76e
Compare
Summary
Closes #3982.