-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Update to major versions of packages #1387
Comments
That's correct. |
so if I have 20/30 dependencies then? How can I manually follow release a new version? Can't poetry scan and tell you what the lastest version of package is vs what I have? |
Running If you use the latest |
I'm using Poetry version 1.0.10. In
When I want to upgrade it with the command
|
@jabbalaci you should try upgrading to current latest version of poetry and if the issue still persists, create new issue with detailed logs. |
@hemanta212 Thanks! I installed it from my OS's repo but it was an old version. Thanks, I will try with the latest version. |
Hello @jabbalaci, I guess you have If I'm right with my assumption above, you would end up with two dependency definitions for mypy. One with the version constraint To summarize: If you have mypy defined in the development section, you want fin swimmer |
@finswimmer : Thanks, you are absolutely right. mypy was originally in the dev. section. I didn't add the Well, in this case a more informative error message would be better. If the error message mentioned that the normal dependencies conflict the dev. dependencies, then it would be easy to figure out what's wrong. |
This thread did not address the case where you have tons of outdated dependencies or would like to run a CI pipeline that upgrades your packages and executes your test suite on the outcome (and then files a PR, like dependabot does for instance). I would really appreciate something like a This would boil down to a builtin workflow that...
However, I can imagine the following problems and cases which make such a script hard to write and generalize yourself:
Can you ease my mind and I should just write this myself, or would you agree that these use cases are valid (or does something like this maybe already exist)? Theoretically, if you don't feel like maintaining this yourselves, maybe this could also be released as an extra package like it is in npm:
|
Yes this should be one usecase for upcoming poetry's plugin api. |
@JosXa In such cases I tend to reach for the hammer and simply recreate the virtual environment from scratch. It is not ideal, but maybe that would be good enough for you (or others with similar use cases). A command such as |
@sinoroc That's a comparable amount of effort though since you still have to be careful with extras, dev, etc., am I right? |
Is there maybe a collection issue, roadmap or ideas board where issues can be linked to and be prettied up for the community to pick projects from? |
You mean some kind of "wishlist for poetry plugins"? That seems like a rather good idea.
No. Unless your
I think, yes. I am not sure why you would want that, but fair enough, to each their own. Just give it a try. And I think I might need to come back on what I said earlier: no need for a
This is not automated as far as I know, you would have to do it by hand. |
Yes there is, you have to search issues with "plugins" label. There aren't much though, as of now. People have been asking for interconvertability between pipfiles requirements and other formats.
I dont think such workaround exists but for a plugin it should be pretty easy to pipe the new versions to poetry since poetry show -l already does most of the work |
For easy clicking: this is the list of tickets labelled "plugins".
As I wrote earlier, I believe this would work. And the resulting pinned version numbers would be written in the lockfile. What would be the point of writing the pinned versions in |
Okay let me lay out that use-case once more: There is a project you haven't touched in a year with 80 dependent PyPI packages. You decide it's time to make some changes and install potentially security-critical updates. You want to upgrade all packages to their latest versions while maintaining a valid dependency graph but also leave the versions halfways pinned in pyproject.toml and running some smoke tests. This way the next person checking out the project can run Plus the automated approach from above. Not sure if it makes sense or if leaving * versions in .toml is actually not as bad as it feels to be |
#461 ? |
Are there plans to add a switch to upgrade to upgrade to the very latest release versions? For example:
|
@timkofu I am not sure I understand how it is different than everything that has been asked and answered in this discussion and in #461. Would you mind expanding on what you are asking for has not been already covered? |
@sinoroc An official confirmation that this is now a planned or currently being worked on feature. @finswimmer only confirmed the request is valid back in June. |
@timkofu Ah, ok, understood. On the other ticket, you can see there was some movement 3 days ago.
|
|
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. |
Question
When you first install a package, a caret requirement is used by default. I.e if when installing poetry finds that latest version of package A is 1.2.3. In pyproject.toml file '^1.2.3' will be used.
In the long run when version of package A will reach to 1.3.0 poetry won't update it since it is against the caret requirements. So am I supposed to know the (major and minor) releases of each packages and manually edit the pyproject.toml file to something like '^1.3.0' (eg for package A) ?
The text was updated successfully, but these errors were encountered: