poetry update: Upgrade Within Constraints
Move dependencies to the latest versions your constraints allow.
poetry update re-resolves dependencies to the newest versions permitted by pyproject.toml and rewrites poetry.lock. It does not change the constraints themselves.
What it does
Updates dependencies (all, or only the ones you name) to the latest compatible versions and updates the lockfile. Constraints in pyproject.toml are respected, not loosened.
Common usage
Terminal
poetry update
poetry update requests
poetry update --dry-run
poetry update --with devCommon CI gotcha: unexpected lock churn
A bare poetry update can bump many transitive packages at once, surprising a pinned CI build. Preview with --dry-run, or update only the package you intend to.
Terminal
# See what would change first:
poetry update --dry-run
# Then update just one:
poetry update requestsRelated guides
poetry lock: Resolve and Write poetry.lockHow poetry lock resolves dependencies and writes poetry.lock without installing, the --no-update flag, and th…
poetry add: Add a Dependency and Re-lockHow poetry add installs a dependency, updates pyproject.toml and poetry.lock, the --group and --dev usage, an…
poetry install: Install from the LockfileHow poetry install resolves and installs dependencies from poetry.lock, the --no-root and --only flags useful…