pythonpython-poetry

Poetry not updating sub dependencies despite version constraint allowing it


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

Solution

  • 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: