-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Lock Python version itself #2560
Comments
Hello @tmshn, poetry doesn't only lock the dependencies for the currently used python version. When it resolves the dependencies, it's looking for package versions that matches every python version, to which the project is compatible and chooses this one. So it doesn't matter, if one developer will use python 3.7 or python 3.8. Unless you haven't specify explicit to use different package version for this python version the same package version gets installed. If it's absolutely necessary that the same python version is used everywhere you have to set a fix value in your fin swimmer |
Hi @finswimmer, thank you for the very quick reply! Let me clarify this point more to understand how Poetry works:
Assume we have constraint I agree with you that explicit version specification in So you mean, we should use |
(Note: I don't meant to blame how Poetry works; just want to know its design choice and rationale behind that) |
Correct.
It just looks at the constraints given by the package. If a package claim to be compatible for python>=3.6 it is compatible to python 3.10 for poetry.
Definitely.
A python version lock should only be necessary if you want to rely on certain features of these version, like e.g. f-string. If this is mandatory for you, than yes. |
Just summary:
|
I understand this is the design choice rather than just happened as a result of implementation, so closing. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Feature Request
Poetry is not only good at developing libraries, but also good at application, which requires careful version lock of depending packages.
However, Poetry doesn't lock Python version. This might led to version mismatch between developers. Say we have constraint
^3.7
, some member might use3.7.6
while others might3.8.1
.IMO, we should lock Python version too to have better reproducibility of environment.
(Note: this is somewhat related to #2558)
The text was updated successfully, but these errors were encountered: