Conversation
|
i just noticed that https://python-poetry.org/docs/dependency-specification/#caret-requirements doesn't exactly say that |
ohemorange
left a comment
There was a problem hiding this comment.
So...I'm going to approve, mostly because it's how we had it before and it's fine.
But I should mention that this is apparently a somewhat controversial topic, which is probably why poetry wrote the docs like that.
But that being said, poetry itself also specifies an upper bound.
In balance I think this is perfectly fine and makes our lives easier.
this PR also removes the part of the comment about changing the value back to the carat form, but given that you're working on dropping python 3.9, I also think that's fine.
yeah, i saw that too and started to get nerdsniped by it, but stopped and it ignored it for now for better or worse. my memory is poetry does get mad in some cases when we remove the upper bound entirely and until we have a strong reason to do this duplication, i personally prefer this approach
i actually did this on purpose because ^3.10 isn't a valid requires-python value (although it is a valid tool.poetry.dependencies.python value). going forward i plan on just using the thanks for the review! |
i was inspired to do this while working on #245
specifying both project.requires-python and tool.poetry.dependencies.python comes from #242 where we wanted to specify requires-python to get nice features from the PR description like:
the initial version of that PR removed both tool.poetry.dependencies.python and the upper bound on the python version. ohemorange correctly noted here that we need the upper bound on the python version for poetry's locking algorithm. this was fixed by following the suggestion from poetry's docs of specifying the python version in both places using slightly different values
poetry's docs make this recommendation for folks who want to avoid to avoid specifying an upper bound in their package's metadata, but i don't think that's something we need to do. as you can see by the metadata diff from the PR description, we previously were defining an upper bound:
to my knowledge, no one ever complained. not only does that approach duplicate information that we need to keep in sync, but project.requires-python and tool.poetry.dependencies.python take slightly different syntax with the ^3.10 caret requirement suggested in the comment above project.requires-python not being a valid value there
because of these downsides, this PR takes a slightly different approach and unifies everything in one place to hopefully make things a little simpler and cleaner for us
i don't think this PR requires two reviews