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

Removed python_requires="<4" #1021

Merged
merged 1 commit into from
Mar 3, 2021
Merged

Removed python_requires="<4" #1021

merged 1 commit into from
Mar 3, 2021

Conversation

engnadeau
Copy link
Contributor

Python 4 doesn't exist, this requirement is redundant
@Embeddave
Copy link

Hi @nedbat are there any plans to make this change to python_requires?

I am running into the same issue as #1020.

I also don't understand the need to specify "<4.0", and I don't want to "surprise" any downstream users by suddenly pinning to a major version of Python

@nedbat
Copy link
Owner

nedbat commented Mar 3, 2021

From the discussion in #1020:

can you help me understand how you ended up with ">=3.6" in your pyproject.yaml? Poetry initializes it with "^3.6", which works.

@Embeddave
Copy link

Embeddave commented Mar 3, 2021

Thank you Ned.

I changed the default from the caret because I don't want to break things for other people (like myself, in other projects) that haven't always specified their Python version as "<4.0". They will also get a failure on install, not just from poetry, but from pip itself.

see comment here from @henryiii
https://mobile.twitter.com/HenrySchreiner3/status/1362183452343296004

Practically, if you haven’t always done it, pip will pull an older release (the first without the <4), which is _not _ more likely to work with a newer Python! Python is not SemVer’d, as well. 4.0 is not supposed to be like 3.0, if ever reached

I am already running into this issue with my own set of tools that depend on each other, and now I have the same issue trying to install pytest-cov.

Beyond avoiding that issue, I don't understand the need to specify Python "<4.0" if there's no concrete plans for 4.0, and Python follows CalVer instead of SemVer.

from this discussion where @matthewfeickert asks
https://mobile.twitter.com/HEPfeickert/status/1362170933658738701

Is there any need to put a "<4.0" in your #Python library's setup.cfg/setup.py python_requires? I have never done this, and it seems that most people don't, but occasionally I've seen people do this. Should we? Or are we all expecting releases out now to not be used in v4.0 era?

Happy to hear that I'm wrong but this is my current understanding.

@matthewfeickert
Copy link

matthewfeickert commented Mar 3, 2021

People may already be aware of this, so apologies if I'm reposting or missing the context if I had read more of the links in this Issue, but @NickleDave is currently having some real world problems with other libraries specifying python_requires = >=3.X, <4.0. So I think his situation can be used as a case study of why this PR is a good idea. 👍

@nedbat
Copy link
Owner

nedbat commented Mar 3, 2021

I still think poetry is doing the wrong thing. But 4.0 is a long way off, and this can relieve some pain. If 4.0 does emerge, and needs to be excluded, we will all as a community have to revisit how these version pins work. Maybe it will be easier then.

@nedbat nedbat merged commit 2cfc9d5 into nedbat:master Mar 3, 2021
@NickleDave
Copy link

🙌 thank you so much!

You are totally right (as far as I understand it) that Poetry's solver is being overly strict.

And yes the community will need to come to a solution.
I will try raising a couple questions in their GitHub discussion to see if I can better understand their thinking.

@henryiii
Copy link

henryiii commented Mar 4, 2021

If you need some ammunition, this has been just fixed in the official docs: pypa/packaging.python.org#850 (see the linked core dev discussion).

@wimglenn
Copy link

Hi Ned, any chance we can get a release with the updated metadata? The poetry 5.5 wheel still has this <4 thing in

@nedbat
Copy link
Owner

nedbat commented Oct 12, 2021

Just for completeness: this is in coverage 6.0.

@NickleDave
Copy link

Thank you @nedbat much appreciated

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.

python_requires="<4" creates issues with dependency solvers
9 participants