diff options
-rw-r--r-- | docs/faq.rst | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/docs/faq.rst b/docs/faq.rst index 9c948d8c..769c74a2 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -124,16 +124,16 @@ install. While creating a test environment tox will invoke pip multiple times, i 1. install the dependencies of the package. 2. install the package itself. -Starting in tox 4.4.0, ``{env_dir}{/}constraints.txt`` is generated by default during ``install_deps`` based on the -package specifications listed under ``deps``. These constraints are subsequently passed to pip during the -``install_package_deps`` stage, causing an error to be raised when the package dependencies conflict with the test -environment dependencies. For stronger guarantees, set ``use_frozen_constraints = true`` in the test environment to -generate the constraints file based on the exact versions enumerated by the ``list_dependencies_command`` (``pip -freeze``). When using frozen constraints, if the package deps are incompatible with any previously installed -dependency, an error will be raised. - -Ensure that ``constrain_package_deps = true`` is set in the test environment in order to use the constraints file -generated by processing the ``deps`` section when performing ``package_deps``. +Starting in tox 4.4.0, when ``constrain_package_deps = true`` is set in the test environment, +``{env_dir}{/}constraints.txt`` will be generated during ``install_deps`` based on the package specifications listed +under ``deps``. These constraints are subsequently passed to pip during the ``install_package_deps`` stage, causing an +error to be raised when the package dependencies conflict with the test environment dependencies. + +For stronger guarantees, set ``use_frozen_constraints = true`` in the test environment to generate the constraints file +based on the exact versions enumerated by the ``list_dependencies_command`` (``pip freeze``). When using frozen +constraints, if the package deps are incompatible with any previously installed dependency, an error will be raised. +To use constraints with url, path, or "extras" (``.[tests]``) deps, then you must ``use_frozen_constraints``, as +these types of deps are not valid constraints as specified (see pypa/pip#8210). Note constraint files are a subset of requirement files. Therefore, it's valid to pass a constraint file wherever you can specify a requirement file. |