Add support for the project section (PEP 621)#9135
Add support for the project section (PEP 621)#9135radoering merged 9 commits intopython-poetry:mainfrom
project section (PEP 621)#9135Conversation
991f3e2 to
198961a
Compare
|
Deploy preview for website ready! ✅ Preview Built with commit 28bbbf3. |
e16fee2 to
a2d9055
Compare
a2d9055 to
a9450c9
Compare
e8593a0 to
163afdd
Compare
|
After this is released, Poetry can be added to the PyPA packaging tutorial. 🚀 |
48358c6 to
aad680e
Compare
|
First of all, thank you for the great work! I'm a bit confused by the entire extra business (which is pretty complicated itself), and especially how For this example [project.optional-dependencies]
# ...
dev = ["cython (>=3.0.10,<4.0.0)", "black >= 24"] # addedSo I go to Suppose I already work with dependencies = [
# ...
"cython[highlight] (>=3.0.10,<4.0.0)"] # addedwhere It looks to me we need a command that "given existing extras
|
c27eb38 to
281fc21
Compare
That's unfortunate but not easy to change as we do not keep track of which extras (of your project) were installed. Furhter, it is not specific to this PR and thereby out of scope here. I suppose there is already an issue about this but I can't find it right now. Feel free to create a new issue. (In case it's a duplicate someone will tell you.)
This conclusion is not correct.
That's expected. See
Both are equivalent.
In the lockfile, only extras of dependencies are fix. All extras of your project are locked and you can/must decide which to install when running
Maybe, you should consider using dependency groups instead of extras. However, dependency groups are only available during development when using Poetry and not visible in the sdist/wheel or to other tools. All in all, there is some room for improvement considering extras but everything that goes beyond my recent change regarding |
281fc21 to
352edf0
Compare
…an extra the optional dependency is added to (python-poetry#9135)
… poetry-core (python-poetry#9135) - update some pyproject.toml files to avoid deprecation warnings in tests for `poetry check` - add explicit test for deprecation warnings that should be printed when running `poetry check` with a legacy project
…ulating the content hash for the lock file (python-poetry#9135)
- add notes about `dynamic` use cases - deprecate `tool.poetry` fields that can be completely replaced by `project` fields - add hint about `poetry check`
c83442d to
2d3bd3d
Compare
…ndencies` and `tool.poetry.dependencies`, update examples (python-poetry#9135)
…an extra the optional dependency is added to (python-poetry#9135)
* bucket transform rust binding * format * poetry x maturin * ignore poetry.lock in license check * update bindings_python_ci to use makefile * newline * python-poetry/poetry#9135 * use hatch instead of poetry * refactor * revert licenserc change * adopt review feedback * comments * unused dependency * adopt review comment * newline * I like this approach a lot better * more tests
…rsion to 2.0.0.dev0 (python-poetry#9135)
… poetry-core (python-poetry#9135) - update some pyproject.toml files to avoid deprecation warnings in tests for `poetry check` - add explicit test for deprecation warnings that should be printed when running `poetry check` with a legacy project
…ulating the content hash for the lock file (python-poetry#9135)
- add notes about `dynamic` use cases - deprecate `tool.poetry` fields that can be completely replaced by `project` fields - add hint about `poetry check`
…ndencies` and `tool.poetry.dependencies`, update examples (python-poetry#9135)
…an extra the optional dependency is added to (python-poetry#9135)
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Pull Request Check List
Resolves: #3332
Resolves: python-poetry/roadmap#3
Requires: python-poetry/poetry-core#708
should not be squashed
Current state:
projectsection (PEP 621) poetry-core#708check,lock,install,build,add,remove,init,newprojectfields and use cases fordynamic(version,readme,classifiers) in the section "The pyproject.toml file".projectfields instead oftool.poetryfields.You can install this branch with pipx as follows:
This will install Poetry with the suffix "_pep621" so that you have to call
poetry_pep621instead ofpoetry. (The suffix is arbitrary, you can choose a different one.)There is no automatic conversion of existing
pyproject.tomlfiles (yet?) butpoetry checkwill give you information which fields should be transferred fromtool.poetrytoproject.