-
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
Automated migration to groups during poetry add --group dev
#6638
Comments
poetry add --group dev
adds duplicate dependencies to as pyproject.toml
with [tool.poetry.dev-dependencies]
poetry add --group dev
This has nothing to do with lock files, but with project files. If you make use of groups in your project, naturally Poetry 1.1 will no longer be able to understand it, as it is a new feature. I have edited your issue to remove the link to the other issue as it is misleading. This is currently a known drawback of the However, such a feature was considered more trouble than it was worth as most users who migrate over will do so by hand-editing I'm reclassifying this as a feature request -- it's welcome if anyone wants to write it, but was considered optional and not written by any maintainer as no one had much interest in a mild edge case like this. |
I noticed that the
I'm curious as to why the |
I think I covered that -- both commands are ignorant of Contributions are welcome, including if you think this deserves some mention in the docs or you want to introduce a migration in code. No one involved at the time thought it was worth the effort to implement and test, is all. |
I'm wondering if |
|
So, how should
|
I assume that's Yes, this forces migration for users who are using |
I've taken a swing a fixing this. I currently have a draft PR (#6677) for this. I'll add some tests and docs later. I just want to make sure that I'm at least on the right track. I've tested this locally, and it seems to work, but I'm not still a newbie on this package and am not familiar with all the different use-cases I'd need to test to make sure that this doesn't have a nasty side-effects. |
Those bits about "hand-editing How is this not a major-version breaking change, if "naturally Poetry 1.1 will no longer be able to understand it, as it is a new feature"? |
The pyproject.toml is front-and-center in Poetry's design and documentation. I'm sorry that you were under the impression it was opaque/only to be managed using the CLI. Please point out deficiencies in the README/docs if you find them/send patches improving them. Regarding the addition of new features, there is a detailed introduction in the release announcement, good documentation for this new feature and its semantics, and backwards compatibility as This issue is for an automated migration to smooth over the transition for CLI-only users, such as yourself. Please keep discussion on-topic in this issue; if you wish to discuss Poetry's development process and how you believe the project can be better, please do so on Discord, via Discussions, or contribute to the project and help shape these decisions with us. |
If Poetry itself introduces a change to
which is pretty opaque. |
You are instead looking for #3316. Please note that the |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Dependency Groups are around now for a while. So I don't think we will implement any migration stuff anymore. |
Running
poetry add --group dev
(orpoetry add --dev
) with a dependency that already exists in the[tool.poetry.dev-dependencies]
section adds a new entry in[tool.poetry.group.dev.dependencies
that may conflict with the existing entry.It's easily fixed (updating
[tool.poetry.dev-dependencies]
to[tool.poetry.group.dev.dependencies]
, and merging the sections if the extra entry has already been added) but it makes the Poetry 1.1 -> 1.2 upgrade painful if you've got lots of repos.produces
edit: Removed unnecessary
[tool.poetry.source]
section in Dockerfile.The text was updated successfully, but these errors were encountered: