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

Remove upper bound from Python version specifier #249

Merged
merged 2 commits into from May 25, 2023
Merged

Remove upper bound from Python version specifier #249

merged 2 commits into from May 25, 2023

Conversation

sisp
Copy link
Contributor

@sisp sisp commented Aug 28, 2022

What is the problem that this PR addresses?
Capping the Python version (e.g. <4) is a bad practice.

How did you solve it?
I've removed the upper bound, i.e. I've replaced the version specifier ^ by >=.

Checklist

  • I have read the Contributor's Guide.
  • I will check that all automated PR checks pass before the PR gets reviewed.

@kiancross
Copy link
Collaborator

Thanks for the PR @sisp. I'll have a read of those articles/PRs this evening. What are the downsides to removing the maximum Python version?

@sisp
Copy link
Contributor Author

sisp commented Aug 30, 2022

@kiancross Poetry will throw an error during dependency resolution when any of the dependencies in the tree uses a maximum version. To fix that, the project itself needs to declare that maximum version, too. That's one of the reasons why this bad practice is spreading; a library author - when using Poetry - may be forced to add the upper bound because one of the dependencies has it.

@sisp
Copy link
Contributor Author

sisp commented Oct 25, 2022

Any update on this PR, @kiancross?

@kiancross
Copy link
Collaborator

Sorry @sisp, I haven't had time to properly understand why this might be necessary and I'm concerned that it might be a breaking change for some users.

@tmbo do you have any thoughts?

@sisp
Copy link
Contributor Author

sisp commented Dec 23, 2022

Check also isort, I raised an issue there about this topic a while ago and it was resolved with the recent v5.11.0 release.

@layday
Copy link
Contributor

layday commented May 6, 2023

Sorry @sisp, I haven't had time to properly understand why this might be necessary and I'm concerned that it might be a breaking change for some users.

This will simply allow downstream Poetry and <insert dependency manager> users to lock their dependencies without having to set an upper bound for Python in their own project. Currently, projects which depend on questionary will need to declare that they do not support Python >= 4 because questionary doesn't either. Essentially, Poetry's practice of capping Python is changing the calculus for the eventual Python 3 -> 4 transition and some people are uncomfortable with that, as well as generally being opposed to upper-capping abstract dependencies.

@sisp
Copy link
Contributor Author

sisp commented May 6, 2023

Exactly.

@kiancross
Copy link
Collaborator

By removing the cap, are we stating we support Python >= 4, despite the fact we possibly do not? If it's a non-breaking change, then happy to merge.

@sisp
Copy link
Contributor Author

sisp commented May 14, 2023

Correct, and the consensus is that this is fine despite no guarantee at this point that questionnary will work without change with Python 4+. It isn't a breaking change because we'd be allowing more Python versions than right now.

@kiancross
Copy link
Collaborator

Ok. Just waiting for #270 to fix the current CI issues, then I will merge this after. Sorry for the delay, and thanks for your contribution :)

@BrianPugh
Copy link
Contributor

I'll also be needing this :D. Thanks sisp!

@kiancross
Copy link
Collaborator

Once the minor merge conflict is resolved, I can merge. If you don't have time to fix, I can merge the branches later:)

@sisp
Copy link
Contributor Author

sisp commented May 25, 2023

@kiancross I've resolved the merge conflict.

@kiancross kiancross enabled auto-merge (squash) May 25, 2023 19:05
@kiancross kiancross merged commit 33a33fc into tmbo:master May 25, 2023
30 checks passed
@BrianPugh BrianPugh mentioned this pull request May 29, 2023
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.

None yet

4 participants