-
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
Poetry 2.0 removals and other breaking changes #9136
Comments
maybe an opportunity to do something about |
and also to take a view on |
A humble 🙏 that if
This would then be much less disruptive for users of tools such as |
(Sorry if this is not the right place to add an Issue on this version.) One problem I noticed is whenever Poetry tries to add a For example, I'm working on the following
which makes sense because dep group is not a thing in 621. |
Thanks for reporting this. I fixed it and added a test.
Since it's an open PR that is not yet merged, you can report issues directly in #9135. |
I think it'd be nice to also get rid of the deprecated |
Yes, we should take a look at all of the deprecated command line options. |
Is there any chance that some of these changes could be enabled via feature flags? I'm particularly interested in #3248 but this could be generally useful for easing the community into most of the listed breaking changes. Perhaps something like: [tool.poetry.future]
lock-no-update-by-default = true Of course doing this would mean maintaining two different code paths, but that's something the maintainers would have to weigh against the benefits of early feedback and (hopefully) a smoother transition. |
No. The reason for a major version bump is for us to have an opportunity to cleanup the code. Maintaining multiple code paths goes against that goal. |
suggest to make |
Looking at the changelog, we've had already some breaking changes in the configuration format:
Here we're discussing some additional breaking changes on the configuration. Would it make sense having some metadata (say, in |
Although I mostly use
There is #3316. I think we are open to adding a version constraint so the user can define compatible poetry versions.
I think that could cause more confusion than it helps respectively increases the maintainance burden. In the end,
At the moment, your best chance is the first line of |
I don't have a strong opinion, but I do myself use I would lean towards making it the default because it feels more "pure" (e.g., by default Poetry will always make sure that you get the same environment as others on the same platform). The counter would be if some users install "extra" things into their venv often and are frustrated that now Poetry uninstalls them. I'd call this an anti-pattern and they should be putting these things in Overall, I would support making |
What's the motivation to exclude python-poetry/poetry-plugin-shell#18 last comment dates 2022, and in any case in that discussion there was no proposal for a better replacement, and a seemingly common feeling against it (which I personally support...). |
No consensus among maintainers. Some would like to remove it and some think it is important core functionality. In my experience, which of course is biased, power users do not use A compromise might be to outsource the command into a plugin, especially with #9547. |
@radoering please do consider moving it to a plugin 🙏 saying it having seen first-hand how much easier it is for engineers (with varying degrees of python comfort) to switch, onboard, and upgrade projects across an org a lot easier without having to reach for yet another tool. In other words, the ability to more efficiently hit the ground running is likely a good thing to have, no matter the skill level |
I'm not sure I properly understood the comment by @emilio-martinez, but moving to a plugin seems a more-than-decent solution. To me, it's a bit confusing that
I'd pretty agree with @dimbleby and @Secrus (though they may have changed their mind in 2 years) At the time, the main reason seemed to be avoiding a breaking change. And that's what Poetry 2.0 is for. Maybe this is too much biased, but moving to a plugin would definitely give the flexibility to handle separately from the rest (possibly with less maintenance, if not deemed fundamental at a later stage). |
@alecandido I said
Emphasis in DO. So I think we're saying the same thing? |
I am currently working on moving the |
I added #9691 to the list. It is "just" a bugfix but I suppose it will be considered a breaking change by users relying on the bug. Additionally, I am not sure yet in which direction we want to change it - it is not clear what is bug and what is correct behavior - so fixing it in a major release feels better than fixing it in a minor release. |
#5990 maybe |
I have thought a bit more about it and tried out some things. I tend to say we should probably better not just make it the default because of two options we do support:
When using these options a default |
Perhaps in those specific circumstances Poetry defaults to |
I am still wondering if different default behavior depending on the environment and having two flags, which both can be the default, is too confusing. Might it make more sense (from a user's perspective) to introduce a separate command like |
I think that could work?
Yeah, that was my first reaction, but maybe it's okay? FWIW, it would match the
uv also calls it
|
I drafted a PR for a |
Another breaking change (if we decide to do it): #9820 |
Once it is merged: |
This issue tracks possible removals and other breaking changes we want to include if the next release (or the one after that) will be a major release. (That does not mean that the changes listed here cannot be included in a minor release after a decent deprecation period.)
Please add a comment if you have concerns or would like to include another pending breaking change that is not on the list.
Background & Motivation
As support for PEP 621 is slowly taking shape (see #9135 to track the current state) and this will be a big, significant change (even if the old way will still be supported), this might be the time for a major version bump. Even if we try to avoid obvious breaking changes, just not ignoring the
project
section anymore will be a subtle breaking change for anyone who is already using this section (for whatever reason). Further, since supporting PEP 621 requires massive changes in many areas of the code, the risk of unintentional breaking changes is higher than usual.Long story short: If we do a major version bump anyway, we should make use of it and remove things / add breaking changes we were holding back so far.
Candidates
Disclaimer: decision is not final and might be subject to change
poetry-plugin-export
although #5740 would be nice#9547 is sufficientsecondary
anddefault
poetry add --optional
to require an extrapoetry shell
poetry self
lock --no-update
the defaultinstall --sync
the default--dev
, removed the rest)no-setuptools
config option(or deprecate?)support forx
instead of*
as wildcardexperimental.system-git-client
tosystem-git-client
--directory
/-C
The text was updated successfully, but these errors were encountered: