Replies: 6 comments 19 replies
-
Would this do the desired behavior?
|
Beta Was this translation helpful? Give feedback.
-
Hello @mogoh, whenever you update a direct dependency, poetry needs to rebuild the dependency tree. This can lead to updating other packages as well within the range of version given in the In your case, you want to keep a dependency of a dependency at a specific version. IMO it is legal that you directly depend on this dependency. So I would suggest you add it to your fin swimmer |
Beta Was this translation helpful? Give feedback.
-
@mogoh What I do is the same as what I do when I add a brand new dependency but don't want to update everything: edit the pyproject.toml to add the new requirement (so in your case this could be Sometimes it's a bit tedious having to look up the new version number I want, but usually by the time I've figured out that something needs updating (due to a security advisory or whatever), I also know what minimum version I now need. I guess another trick would be to set the requirement to |
Beta Was this translation helpful? Give feedback.
-
For people needing this – #3248 proposes to change |
Beta Was this translation helpful? Give feedback.
-
I'm not sure if this option was available when the original question was asked. But, to update Django only (following your version rule
The trick here is to use poetry's 'loose pinning' options to specify what you are happy with. If you specify exact versions of everything in For dependencies that follow sematic versioning, I would normally use something like this in
With this, Where the dependency has a good reputation for not introducing breaking changes in
With this, However, the looser the pinning, the more cautious you need to be when committing the result of |
Beta Was this translation helpful? Give feedback.
-
Hey I have faced one issue related to Flower and TornadoI need to update Tornado lib version(in requirements.txt) via flower lib version(in requirements.in). What steps am I missing here? |
Beta Was this translation helpful? Give feedback.
-
Hello,
I just had some problems with pipenv and thought about switching to poetry.
The problem, I would like to solve
Let's say I have two packages:
package-a
package-b
package-a has dependency dep-a
and package-b has dependency dep-b
Now I want to update package-a and dep-a without updating dep-b, not even a minor version.
A concrete example
I have this packages.
[tool.poetry.dependencies]
django = "==2.2.18"
django-cms = "==3.7.4"
poetry.lock has for example:
django-treebeard = ">=4.3"
I want to be able to update django to version 2.2.19 without updating treebeard. Treebeard 4.5 introduced a bug that could broke the database. If I update django, I don't want to worry about that kind of problems.
To my knowledge, this is not easy possible in pipenv. Is this possible in poetry?
Beta Was this translation helpful? Give feedback.
All reactions