@@ -110,12 +110,14 @@ work to call the app (`__name__` will be `"__main__"` in that case).
110110
111111### Development dependencies
112112
113- It is recommended to use dependency-groups instead of making requirement files.
114- This allows you to specify dependencies that are only needed for development;
115- unlike extras, they are not available when installing via PyPI, but they are
116- available for local installation, and the ` dev ` group is even installed by
117- default when using ` uv ` .
118-
113+ The proper way to specify dependencies exclusively used for development tasks
114+ (such as ` pytest ` , ` ruff ` , packages for generating documentation, etc.) is to
115+ use dependency-groups. Dependency-groups are recommended over requirement files
116+ because they are formally standardized (i.e. they will be more portable going
117+ forward) and they are more composable. In contrast with extras,
118+ dependency-groups are not available when installing your package via PyPI, but
119+ they are available for local installation (and can be installed separately from
120+ your package); the ` dev ` group is even installed, by default, when using ` uv ` .
119121Here is an example:
120122
121123``` toml
@@ -130,10 +132,11 @@ dev = [
130132
131133You can include one dependency group in another. Most tools allow you to install
132134groups using ` --group ` , like ` pip ` (25.1+), ` uv pip ` , and the high level ` uv `
133- interface. You do not need to install the package, though usually you do (the
134- high level ` uv ` interface does). Nox, Tox, and cibuildwheel all support groups
135- too. The ` dependency-groups ` package provides tools to get the dependencies,
136- too.
135+ interface. It's possible to install a package's dependency group without
136+ installing the package itself, but usually you'll want to instruct your tool to
137+ install both (the high level ` uv ` interface does this automatically). Nox, Tox,
138+ and cibuildwheel all support groups, too. The ` dependency-groups ` package also
139+ provides tools to get the dependencies.
137140
138141[ metadata ] : https://packaging.python.org/en/latest/specifications/core-metadata/
139142[ trove classifiers ] : https://pypi.org/classifiers/
0 commit comments