You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/faq.md
+163Lines changed: 163 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -271,3 +271,166 @@ The two key options we are using here are `--no-root` (skips installing the proj
271
271
Poetry's default HTTP request timeout is 15 seconds, the same as `pip`.
272
272
Similar to `PIP_REQUESTS_TIMEOUT`, the **experimental** environment variable `POETRY_REQUESTS_TIMEOUT`
273
273
can be set to alter this value.
274
+
275
+
276
+
### How do I migrate an existing Poetry project using `tools.poetry` section to use the new `project` section (PEP 621)?
277
+
278
+
{{% note %}}
279
+
Poetry `>=2.0.0` should seamlessly support both `tools.poetry` section only configuration as well using the `project` section. This
280
+
lets you decide when and if you would like to migrate to using the `project` section as [described by PyPA](https://packaging.python.org/en/latest/specifications/pyproject-toml/#declaring-project-metadata-the-project-table).
281
+
282
+
See documentation on [the `pyproject.toml` file]({{< relref "pyproject" >}}), for information specific to Poetry.
283
+
{{% /note %}}
284
+
285
+
Due to the nature of this change some manual changes to your `pyproject.toml` file is unavoidable in order start using the `project` section. The following tabs
286
+
show a transition example. If you wish to retain Poetry's richer [dependency specification]({{< relref "dependency-specification" >}}) syntax it is recommended that
287
+
you use dynamic dependencies as described in the second tab below.
"Topic :: Software Development :: Libraries :: Python Modules",
415
+
]
416
+
417
+
[tool.poetry.group.dev.dependencies]
418
+
pre-commit = ">=2.10"
419
+
420
+
[tool.poetry.group.test.dependencies]
421
+
pytest = ">=8.0"
422
+
423
+
[build-system]
424
+
requires = ["poetry-core>=2.0.0,<3.0.0"]
425
+
build-backend = "poetry.core.masonry.api"
426
+
```
427
+
428
+
{{< /tab >}}
429
+
430
+
{{< /tabs >}}
431
+
432
+
{{% note %}}
433
+
- The `classifiers` property is dynamic to allow Poetry to create and manage Python classifiers in accordance with supported Python version.
434
+
- The `python` dependency, in this example was replaced with `project.requires-python`. However, note that if you need an upper bound on supported Python versions refer to the documentation [here]({{< relref "pyproject#requires-python" >}}).
435
+
- The [`requires-poetry`]({{< relref "pyproject#requires-poetry" >}}) is added to the `tools.poetry` section.
0 commit comments