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

support for poetry add --latest #914

Closed
2 tasks done
woile opened this issue Feb 23, 2019 · 9 comments
Closed
2 tasks done

support for poetry add --latest #914

woile opened this issue Feb 23, 2019 · 9 comments

Comments

@woile
Copy link

woile commented Feb 23, 2019

  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Feature Request

Add a way to update to latest released version. Let's say you are using gunicorn 18.x.x and you want to install the latest gunicorn 19.x.x.
Right now I couldn't find a straight forward way to do it. I found out that removing the package from the pyproject.toml and doing poetry add <package> does what I want.

Ideally I think it would be nice to have something like:
poetry add <package> --latest

Notes

Doing poetry add <package>==<latest_version> works also, but it's not the right way, because the pyproject.toml will be updated with a =<version> instead of ^<version>.

I searched a lot and couldn't find the solution, so in case it's already there I'll try to update the docs.

@uSpike
Copy link
Contributor

uSpike commented Feb 28, 2019

If you have gunicorn = "^18" in your pyproject.toml and then run poetry update gunicorn, it will update to the latest gunicorn available.

@radek-sprta
Copy link
Contributor

And if you always want get the latest version, just pin it to gunicorn = "*" in pyproject.yml.

@woile
Copy link
Author

woile commented Feb 28, 2019

My use case is different. I want to update once to the latest, not always install the latest, so no *, and I want to update the major, so no ^. In yarn for example you can do yarn add x@latest so it will install latest and will pin your version to the latest with a caret.

The main idea of this is that you manually update to the latest major. Otherwise you poetry update the minors

@uSpike
Copy link
Contributor

uSpike commented Feb 28, 2019

If i'm understanding, you'd want

gunicorn = "18.*"

and then change it to

gunicorn = "19.*"

and run poetry update?

@woile
Copy link
Author

woile commented Mar 7, 2019

No, I would like to have:

gunicorn = "^18"

and then do

poetry add gunicorn --latest

and I would see reflected in my pyproject.toml

gunicorn = "^19"

Otherwise a user has to manually search for the latest version.

@floer32
Copy link

floer32 commented Mar 10, 2019

My 2c: I think this is an impedance mismatch between the pyproject and the lockfile...

@woile
Copy link
Author

woile commented Mar 10, 2019

I don't see how, it should update the deps if possible, otherwise error. yarn and npm have this behaviour irc.

@sdispater
Copy link
Member

Added in #1221

Copy link

github-actions bot commented Mar 3, 2024

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 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants