Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 task done
Uninen opened this issue Jan 24, 2020 · 10 comments
Closed
1 task done

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

Uninen opened this issue Jan 24, 2020 · 10 comments
Labels
area/docs Documentation issues/improvements

Comments

@Uninen
Copy link

Uninen commented Jan 24, 2020

  • 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)?

@Uninen Uninen added the area/docs Documentation issues/improvements label Jan 24, 2020
@AndreCNF
Copy link

AndreCNF commented Feb 5, 2020

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

@yajo
Copy link

yajo commented Mar 18, 2020

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

@Garrett-R
Copy link

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"

@sinoroc
Copy link

sinoroc commented Dec 18, 2020

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

@finswimmer
Copy link
Member

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 #461

fin swimmer

@Garrett-R
Copy link

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

@wyattowalsh
Copy link

I recently created a Python3 script to update all Poetry packages to their latest version while preserving extras and dependency groups. Check it out here

@cfxegbert
Copy link

I recently created a Python3 script to update all Poetry packages to their latest version while preserving extras and dependency groups. Check it out here

https://github.com/MousaZeidBaker/poetry-plugin-up

@sinoroc
Copy link

sinoroc commented Feb 9, 2024

Isn't it faster to delete the poetry.lock file and the environment and recreate them from scratch? Poetry would normally get the latest, unless there is a reason not to (the lock file being one of those possible reasons).

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/docs Documentation issues/improvements
Projects
None yet
Development

No branches or pull requests

8 participants