-
-
Notifications
You must be signed in to change notification settings - Fork 422
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
Resolution failure because of python-requires? #454
Comments
">=3.6.1,<3.10" is a rather strong constraint, and you should make sure the |
Not a bug, close it now, thanks |
Oh, I see, thank you for your help! I'll remove |
I have a similar issue: Am I doing something wrong with the Python requirements or is there an issue with Ok, after some more thinking, I guess it makes sense: If a limit the required Python version to Is it so unusual for a python package to specify that it is only working with 3.7.* and then it would not be found with the default
|
@pohlt Wrong direction, PDM tries to guarantee pyproject's requires-python is a subset of the python constraints of ALL candidates. A narrow range like |
It just seems overly optimistic to me to claim that my (or any) package will work with Python 3.7 and beyond, e.g., 4.x, and 42.x, so for me it would make more sense to limit the upper bound like ==3.7.*. But this optimism seems to be common practice, so I'll use it as well. 👍🏼 Anecdote: pydantic says it's fine with anything >=3.6.1 and almost would not have worked with 3.10. 😜 |
Does it make sense to enforce this for development dependencies as well? In short, I want to be able to publish packages for Python 3.6+, while still dev-depending on packages requiring higher versions: I'm fine with using 3.6+ to run all my actions (quality, tests, etc.) except for "build the docs" for which I would switch to 3.7+. In fact, PDM does that in a sense. You have to install it with 3.7+, but it works for lower versions. What do you think about relaxing that guarantee for dev-deps @frostming? Is it possible technically? |
You can use environment markers:
|
I tried that but then the resolution fails:
Do you want me to open a new issue? |
@pawamoy Yes, you can do it, also can you provide the full pyproject.toml? |
Steps to reproduce
I published a project (mkdocs-coverage version 0.2.2) on PyPI with this Python requirement:
PDM fails to resolve this version 0.2.2 in another project where the Python requirement is:
I was able to
pip install
this version so it is definitely available.Note however that I'm not sure if the issue comes from PDM (but it seems like it is).
Actual behavior
PDM fails to resolve the version 0.2.2 of mkdocs-coverage. It manages to resolve the previous version though, 0.2.1, which was managed by Poetry with this Python requirement:
python = "^3.6"
.Expected behavior
No resolution failure.
Environment Information
Could be related to #141.
The text was updated successfully, but these errors were encountered: