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

Clarification on documentation #2179

Closed
Drachenfels opened this issue Aug 11, 2023 · 4 comments · Fixed by #2452
Closed

Clarification on documentation #2179

Drachenfels opened this issue Aug 11, 2023 · 4 comments · Fixed by #2452
Labels
⭐ enhancement Improvements for existing features

Comments

@Drachenfels
Copy link

I am reading documentation (https://pdm.fming.dev/latest/usage/project/#set-requires-python-value) and what is written there I do not understand, not sure if there is something about python version qualifier I am not aware of or maybe there is mistake in docs.

The paragraph in question:

For example, consider the following setup:

  • Project: requires-python = ">=3.9"
  • Package foo: requires-python = ">=3.7,<3.11"

Resolving the dependencies will cause a ResolutionImpossible.

Because the dependency's requires-python is >=3.7,<3.11, it doesn't cover the project's requires-python range of >=3.9. In other words, the project promises to work on Python 3.11 and above, but the dependency doesn't support it. Since PDM creates a cross-platform lockfile that should work on all Python versions within the requires-python range, it can't find a valid resolution. To fix this, you need add a maximum version to requires-python, like >=3.9,<3.11.

My question is why, the project requires >=3.9 and dependency is >=3.7 and <3.11. I would think that the overlapping range of versions are 3.9 and 3.10.

Also, doc says: In other words, the project promises to work on Python 3.11 and above, but the dependency doesn't support it., I would argue that the project promises to work on Python 3.9 and above (and it confused me hella lot)

After writing all of that, I am guessing the issue is that the project is open-ended while sub-dependency is limited to 3.10 max.

Maybe doc should read something like that:

In other words, the project promises to work on Python 3.9, 3.10, 3.11 (and so on), but the dependency doesn't support Python 3.11 (or any higher).

The second question is this screenshot of documentation:

selection-20230811141710

The second row has a typo perhaps? It should read: "Python 3.7, 3.8, 3.9 and 3.10" vs current: "Python 3.7, 3.8 and 3.10"

While this is minor, due to confusion with the sentence above, it made me question my senses (or perhaps I am having gaps in my knowledge).

@Drachenfels Drachenfels added the ⭐ enhancement Improvements for existing features label Aug 11, 2023
@pawamoy
Copy link
Contributor

pawamoy commented Aug 11, 2023

Maybe doc should read something like that

Yes, that would be nice, do you want to send a PR?

The second row has a typo perhaps?

Definitely, feel free to fix this as well in the smae PR if you send one! Thanks for reporting :)

@Drachenfels
Copy link
Author

Sure, thing, let me figure out how to update docs and PR will be up in a day or two.

@sanmai-NL
Copy link
Contributor

@Drachenfels Do you have a new time frame?

@Drachenfels
Copy link
Author

Apologies guys, I originally planned to do it as I said 1 or 2 days later, but work being work I got sucked by it, and shortly after I went for 2 weeks holidays and completely forgot about it afterward.

Thanks for merging it tho!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⭐ enhancement Improvements for existing features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants