admin管理员组

文章数量:1123415

My code is using a package (taskiq), which in turn depends on another package (pycron). Why is poetry update not updating pycron despite version constraints allowing it?

$ poetry update
Updating dependencies
Resolving dependencies... (2.2s)

No dependencies to install or update

$ poetry show -o                                                  
pycron    3.0.0  3.1.1  Simple cron-like parser, which determines if current datetime matches conditions.

$ poetry show --why --tree pycron   
taskiq 0.11.10 Distributed task queue with full async support
└── pycron >=3.0.0,<4.0.0

My code is using a package (taskiq), which in turn depends on another package (pycron). Why is poetry update not updating pycron despite version constraints allowing it?

$ poetry update
Updating dependencies
Resolving dependencies... (2.2s)

No dependencies to install or update

$ poetry show -o                                                  
pycron    3.0.0  3.1.1  Simple cron-like parser, which determines if current datetime matches conditions.

$ poetry show --why --tree pycron   
taskiq 0.11.10 Distributed task queue with full async support
└── pycron >=3.0.0,<4.0.0
Share Improve this question edited 7 hours ago sinoroc 22.2k3 gold badges51 silver badges85 bronze badges asked 14 hours ago DanielDaniel 1,6384 gold badges25 silver badges55 bronze badges 1
  • If I read the documentation for poetry update correctly, some update should happen. So maybe there is a bug in Poetry. Maybe the bug is in the documentation. – sinoroc Commented 7 hours ago
Add a comment  | 

1 Answer 1

Reset to default 0

You can answer such questions by insisting that poetry install the latest version of the project that you expect to be updated eg poetry add "pycron>=3.1.1"

Then one of three things will happen:

  • poetry will refuse to make that change and will tell you the conflict that prevents it from doing so
  • poetry will make the change: but to make that work it will have to downgrade something else. This happens when the latest versions of two packages conflict in some way, but a solution can be found by downgrading either one of them.
  • (very unlikely) poetry will make the change without downgrading anything else, and you will still be confused about why it did not do so in the first place

本文标签: pythonPoetry not updating sub dependencies despite version constraint allowing itStack Overflow