Skip to content

[poetry] Fix most deprecations without affecting the dependencies#750

Merged
Pierre-Sassoulas merged 3 commits intomasterfrom
upgrade-pyproject-toml
Apr 10, 2025
Merged

[poetry] Fix most deprecations without affecting the dependencies#750
Pierre-Sassoulas merged 3 commits intomasterfrom
upgrade-pyproject-toml

Conversation

@Pierre-Sassoulas
Copy link
Copy Markdown
Collaborator

@Pierre-Sassoulas Pierre-Sassoulas commented Apr 10, 2025

In order to be able to track where the cryptography dependency is taken I need to be able to use tool I know better than poetry and so making the pyproject.toml more normalized is helpful. In order to do that I start by fixing the output of poetry check.

Before:

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.license] is deprecated. Use [project.license] instead.
Warning: [tool.poetry.authors] is deprecated. Use [project.authors] instead.
Warning: [tool.poetry.maintainers] is deprecated. Use [project.maintainers] 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: [tool.poetry.extras] is deprecated. Use [project.optional-dependencies] 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').

After:

Warning: [tool.poetry.extras] is deprecated. Use [project.optional-dependencies] instead.

Those last changes are what I actually need but they are going to change the dependencies used so let's do that in another MR.

@Pierre-Sassoulas
Copy link
Copy Markdown
Collaborator Author

Blocked by #749, will need rebase.

@Pierre-Sassoulas Pierre-Sassoulas force-pushed the upgrade-pyproject-toml branch 2 times, most recently from cded073 to 5b87f52 Compare April 10, 2025 07:15
@Pierre-Sassoulas Pierre-Sassoulas merged commit b8dfa68 into master Apr 10, 2025
7 checks passed
@Pierre-Sassoulas Pierre-Sassoulas deleted the upgrade-pyproject-toml branch April 10, 2025 13:39
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.

2 participants