poetry update --latest (w/ ignoring current pinning)

Created on 24 Jan 2020  路  6Comments  路  Source: python-poetry/poetry

  • [x] I have searched the issues of this repo and believe that this is not a duplicate.

Issue

I've tried to search both documentation, issues and Web, but haven't found a solution for use case of "please update this package to newest version without reading current pinning in pyproject.toml". This is something I do quite often and so far I haven't found a clean way of doing it with Poetry.

For example: I currently have django = "^2.0.0" in my pyproject.toml but I'd like to upgrade that to the very latest version (3.0.2). I can of course change the pinning by hand to pyproject.toml but what if I want to upgrade my whole project to latest everything (every package)? What I'd like to is something like poetry update --latest

Is there currently a way to do this without too much manual work (for one or many packages)?

Documentation

Most helpful comment

I'd also prefer to have a more intuitive way of updating packages to the latest version. Right now, to update packages, I run this command, which seems to work fine (although it's not as clear as using a command called 'update'):
poetry add PACKAGE_NAME@latest

All 6 comments

I'd also prefer to have a more intuitive way of updating packages to the latest version. Right now, to update packages, I run this command, which seems to work fine (although it's not as clear as using a command called 'update'):
poetry add PACKAGE_NAME@latest

@AndreCNF Thanks! It works like a charm! If that were documented somewhere, it'd be enough for me.

I do notice that using this will change your version specification a bit. For example, if you have

Flask = "1.1.1"

and then do poetry add PACKAGE_NAME@latest, it will change it to:

Flask = "^1.1.2"

@Garrett-R That seems normal. What else were you expecting?

Hello,

the poetry add PACKAGE_NAME@latest syntax is mentioned in the docs. A command to upgrade all packages to the latest version is already requested in https://github.com/python-poetry/poetry/issues/461

fin swimmer

@sinoroc I was expecting it to not add the caret. I started an issue here.

Was this page helpful?
0 / 5 - 0 ratings