Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If my understanding is not wrong, this is basically the same as what is was
https://python-poetry.org/docs/dependency-specification/#version-constraints
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example from the documentation:
^0.2.3 | >=0.2.3 <0.3.0
Installation example:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then, maybe we should change it to
tomlkit = ">=0.7.0,<1.0.0"
instead?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then someone might have this situation. What if someone uses commitizen and an x package that has
tomlkit < 0.6.0 and >= 0.5.3
in its dependencies? If someone hastoolkit < 0.6.0 and >= 0.5.3
then at least we won't have a conflict. And when installing commitzen and poetry, we will install the last package, because poetrytomlkit = >= 0.7.0, < 1.0.0
and commitzentomlkit = >= 0.5.3, < 1.0.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If someone has
tomlkit < 0.6.0 and >= 0.5.3
then updating to a newer version is cheap, as there are no crazy breaking changes in the changelog and it's recommended to update.But I'm okay with the proposed change or with the one from Lee
tomlkit = ">=0.7.0,<1.0.0"
, using0.7.0
would make it more in compliance with toml format. Which one do you prefer?Regarding the conflicts,
poetry
is usually not recommended to install it on project level.And for commitizen, if there were more reports of conflicts, we should consider using a
_vendor/
folder, using something like vendy. But so far we haven't had any issues, and we try to keep deps small.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will be satisfied with both options :) I originally wanted to make a
toolkit = ">=0.7.0,<1.0.0
, but I thought that such changes could break someone's build. So I leave the choice to you. If you prefer>=0.7.0,<1.0.0
then write to me and I will correct the commit.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I got your point. I misunderstood the meaning of
"^0.5.3"
. I think your solution is a better one. I'll merge it. Thanks for your contribution!As for dependency conflict, I'd suggest using tools like pipx to install python cli-tools like poetry and commitizen. Maybe we could add it to the doc. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! It is obvious to me that pipx is needed, but I just ran into this problem because another developer did not know it. So it would be ideal to update the documentation and recommend pipx (do as in the poetry documentation). It should be easy to update the documentation and I would even do a PR, but my English is not so good :(