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

[>=1.2] dev group ignored when deprecated tool.poetry.dev-dependencies is present in pyproject.toml #5424

Closed
3 tasks done
zEdS15B3GCwq opened this issue Apr 7, 2022 · 4 comments
Labels
kind/bug Something isn't working as expected

Comments

@zEdS15B3GCwq
Copy link

  • I am on the latest Poetry version.

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

  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

  • OS version and name: Win 11 21H2

  • Poetry version: 1.2.0b1 (latest as of 2022 Apr 7)

Issue

I have a project that was created with Poetry 1.1.*, and when I upgraded Poetry to the latest dev version (1.2.0b1), the dev dependencies of the project (added in 1.1) stopped installing on poetry install. I've found that the deprecated section [tool.poetry.dev-dependencies] was still in pyproject.toml, and when it was present, poetry would not recognise the dev packages in [tool.poetry.group.dev.dependencies].

Furthermore, I had some cases in which dev dependencies were removed from the project on a poetry upgrade and in other situations, but those cases I did not explore further so I'm just mentioning them to indicate that there may be further issues.

minimal example:

[tool.poetry]
name = "bb"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.10"
decorator = "^5.1.1"

[tool.poetry.group.dev.dependencies]
dill = "^0.3.4"

[tool.poetry.dev-dependencies]

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

Executing poetry install or even poetry install --with=dev only installs decorator.

If the section [tool.poetry.dev-dependencies] is renamed or removed, poetry will behave correctly.

I'm unsure in which situations the empty [tool.poetry.dev-dependencies] section can remain or appear in the project.toml file.

@zEdS15B3GCwq zEdS15B3GCwq added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Apr 7, 2022
@abn
Copy link
Member

abn commented Apr 7, 2022

This should be resolved with python-poetry/poetry-core#305.

Next poetry release with the next core release should fix this.

@abn abn removed the status/triage This issue needs to be triaged label Apr 7, 2022
@abn abn closed this as completed Apr 7, 2022
@zEdS15B3GCwq
Copy link
Author

@abn , that's good to hear. Is there any chance for a fix for current 1.2?

@abn
Copy link
Member

abn commented Apr 9, 2022

You could manually update poetry-core to git@master in poetry's own virtual environment.

The next 1.2 release will have this fix.

Copy link

github-actions bot commented Mar 2, 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 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

2 participants