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/usage.rst
+20-2Lines changed: 20 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -126,25 +126,43 @@ Then running ``nox --session tests`` will actually run all parametrized versions
126
126
Changing the sessions default backend
127
127
-------------------------------------
128
128
129
-
By default Nox uses ``virtualenv`` as the virtual environment backend for the sessions, but it also supports ``conda``, ``mamba``, and ``venv`` as well as no backend (passthrough to whatever python environment Nox is running on). You can change the default behaviour by using ``-db <backend>`` or ``--default-venv-backend <backend>``. Supported names are ``('none', 'virtualenv', 'conda', 'mamba', 'venv')``.
129
+
By default Nox uses ``virtualenv`` as the virtual environment backend for the sessions, but it also supports ``uv``, ``conda``, ``mamba``, and ``venv`` as well as no backend (passthrough to whatever python environment Nox is running on). You can change the default behaviour by using ``-db <backend>`` or ``--default-venv-backend <backend>``. Supported names are ``('none', 'uv', 'virtualenv', 'conda', 'mamba', 'venv')``.
130
130
131
131
.. code-block:: console
132
132
133
133
nox -db conda
134
134
nox --default-venv-backend conda
135
135
136
+
.. note::
137
+
138
+
The ``uv``, ``conda``, and ``mamba`` backends require their respective
139
+
programs be pre-installed. ``uv`` is distributed as a Python package
140
+
and can be installed with the ``nox[uv]`` extra.
136
141
137
142
You can also set this option in the Noxfile with ``nox.options.default_venv_backend``. In case both are provided, the commandline argument takes precedence.
138
143
139
144
Note that using this option does not change the backend for sessions where ``venv_backend`` is explicitly set.
140
145
146
+
.. warning::
147
+
148
+
The ``uv`` backend does not install anything by default, including ``pip``,
149
+
as ``uv pip`` is used to install programs instead. If you need to manually
150
+
interact with pip, you should install it with ``session.install("pip")``.
151
+
152
+
.. warning::
153
+
154
+
Currently the ``uv`` backend requires the ``<program name> @ .`` syntax to
155
+
install a local folder in non-editable mode; it does not (yet) compute the
156
+
name from the install process like pip does if the name is omitted. Editable
157
+
installs do not require a name.
158
+
141
159
142
160
.. _opt-force-venv-backend:
143
161
144
162
Forcing the sessions backend
145
163
----------------------------
146
164
147
-
You might work in a different environment than a project's default continuous integration settings, and might wish to get a quick way to execute the same tasks but on a different venv backend. For this purpose, you can temporarily force the backend used by **all** sessions in the current Nox execution by using ``-fb <backend>`` or ``--force-venv-backend <backend>``. No exceptions are made, the backend will be forced for all sessions run whatever the other options values and Noxfile configuration. Supported names are ``('none', 'virtualenv', 'conda', 'venv')``.
165
+
You might work in a different environment than a project's default continuous integration settings, and might wish to get a quick way to execute the same tasks but on a different venv backend. For this purpose, you can temporarily force the backend used by **all** sessions in the current Nox execution by using ``-fb <backend>`` or ``--force-venv-backend <backend>``. No exceptions are made, the backend will be forced for all sessions run whatever the other options values and Noxfile configuration. Supported names are ``('none', 'uv', 'virtualenv', 'conda', 'mamba', 'venv')``.
0 commit comments