Replies: 2 comments
-
|
I personally wouldn't be in favour of pinning click to an exact version. If we don't pin, downstream libraries can still pin themselves if they prefer to have a known, stable configuration. But vice versa, if we pin, then we block other users from installing a newer version of Click if Typer hasn't made a release yet. |
Beta Was this translation helpful? Give feedback.
-
|
I would also not pin to an exaxt version. But similar to having pinned a minimum version, it might make sense to pin a maximum version. That would always be the curretn click version at the date of release for a new typer version, e.g.:
As 8.3.0 is the most recent version. Next typer release you could easily also bump this click version. I am fully aware that this is not ideal, but the fact that click breaks on typer so often may be more important than allowing downstream users to use any click version they want? To be fair, people are using typer to NOT deal with click directly, so they are likely fine with typer limiting the click version to a range that is known to be working. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
First Check
Commit to Help
Example Code
Description
We are using
typerto create nice command line interfaces for our tools. We like it a lot because it is far superior than using pureclick.We also use our tools a lot in CI pipelines. However, with both recent minor version bumps of
click, our pipelines started to fail and we had to fix dependencies all around.In our Python project we pin
typerto an exact version. The reason is, that according to Semantic Versioning, any version with MAJOR 0 can always contain breaking changes [0].typerpins click to>= 8.0.0:typer/pyproject.toml
Line 36 in dc07284
This would be fine if
clickwould adhere to Sematic Versioning, as it would mean that any same MAJOR version would not contain any breaking changes [1].However,
clickmaintainer Pallets explicity states, that they are NOT using Sematic Versioning [2]. They claim to not introduce breaking changes, but the last twoclickminor versions (8.2.0 and 8.3.0) definitely were breaking ontyperrequiring versions 0.15.4, 0.16.0, 0.16.1, 0.17.5, and 0.18.0.One could argue that it is my own fault to pin
typerbut not pinningclick. But I think at this pointtypershould consider pinningclickto a fixed version.typercould then update click with every release to the lastest-greatest version.typerhas a much shorter release cycle anyway, so it is not like we would be missing out on the latestclickversion by pinning it.So, what do you think?
[0] https://semver.org/#spec-item-4
[1] https://semver.org/#spec-item-8
[2] https://palletsprojects.com/versions#not-semver
Operating System
Linux
Operating System Details
No response
Typer Version
0.17.4
Python Version
3.12
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions