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/_includes/pyproject.md
+8-10Lines changed: 8 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -110,12 +110,9 @@ work to call the app (`__name__` will be `"__main__"` in that case).
110
110
111
111
### Development dependencies
112
112
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 devlopment tasks (such as `pytest`, `ruff`, packages for generating documentation, etc.) is to use dependency-groups.
114
+
Dependency-groups are recommended over requirement files because they are formally standardized (i.e. they will be more portable going forward) and they are more composable.
115
+
In contrast with extras, dependency-groups are not available when installing your package via PyPI, but they are available for local installation (and can be installed separately from your package); the `dev` group is even installed, by default, when using `uv`.
119
116
Here is an example:
120
117
121
118
```toml
@@ -130,10 +127,11 @@ dev = [
130
127
131
128
You can include one dependency group in another. Most tools allow you to install
132
129
groups 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.
130
+
interface. It's possible to install a package's dependency group without
131
+
installing the package itself, but usually you'll want to instruct your tool to
132
+
install both (the high level `uv` interface does this automatically).
133
+
Nox, Tox, and cibuildwheel all support groups, too. The `dependency-groups`
134
+
package also provides tools to get the dependencies.
0 commit comments