Skip to content

Conversation

@borgoat
Copy link

@borgoat borgoat commented May 18, 2025

Hello!

I was trying to run some scripts and realised uv would not install the dependencies from pyproject.toml, as it could not find the standard [project] section.

Furthermore, poetry itself would complain about some deprecated fields:

$ poetry check
The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead.
Error: pyproject.toml changed significantly since poetry.lock was last generated. Run `poetry lock` to fix the lock file.
Warning: The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead.
Warning: [tool.poetry.name] is deprecated. Use [project.name] instead.
Warning: [tool.poetry.version] is set but 'version' is not in [project.dynamic]. If it is static use [project.version]. If it is dynamic, add 'version' to [project.dynamic].
If you want to set the version dynamically via `poetry build --local-version` or you are using a plugin, which sets the version dynamically, you should define the version in [tool.poetry] and add 'version' to [project.dynamic].
Warning: [tool.poetry.description] is deprecated. Use [project.description] instead.
Warning: [tool.poetry.readme] is set but 'readme' is not in [project.dynamic]. If it is static use [project.readme]. If it is dynamic, add 'readme' to [project.dynamic].
If you want to define multiple readmes, you should define them in [tool.poetry] and add 'readme' to [project.dynamic].
Warning: [tool.poetry.authors] is deprecated. Use [project.authors] instead.
Warning: [tool.poetry.keywords] is deprecated. Use [project.keywords] instead.
Warning: [tool.poetry.classifiers] is set but 'classifiers' is not in [project.dynamic]. If it is static use [project.classifiers]. If it is dynamic, add 'classifiers' to [project.dynamic].
ATTENTION: Per default Poetry determines classifiers for supported Python versions and license automatically. If you define classifiers in [project], you disable the automatic enrichment. In other words, you have to define all classifiers manually. If you want to use Poetry's automatic enrichment of classifiers, you should define them in [tool.poetry] and add 'classifiers' to [project.dynamic].
Warning: [tool.poetry.homepage] is deprecated. Use [project.urls] instead.
Warning: [tool.poetry.repository] is deprecated. Use [project.urls] instead.
Warning: Defining console scripts in [tool.poetry.scripts] is deprecated. Use [project.scripts] instead. ([tool.poetry.scripts] should only be used for scripts of type 'file').

In this PR I updated the existing pyproject.toml files to use the most recent standard format, using uvx migrate-to-uv -while keeping the non-standard poetry fields, too. If I did everything correctly, this should be backwards compatible. 🙂 Although I'd happily provide another PR to switch to uv in CI, too.

I found #11597 is also solving this problem in a different way, but I believe this change to pyproject.toml would be needed sooner or later, anyway, since Poetry is also correctly deprecating their own configuration in favour of the standard one. And so even if sticking to Poetry, at some point that would also fail.

@borgoat borgoat force-pushed the chore/uv branch 2 times, most recently from 325cd3e to 9162f38 Compare May 22, 2025 09:54
@borgoat borgoat force-pushed the chore/uv branch 2 times, most recently from baefee7 to ff9f1c1 Compare May 28, 2025 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant