summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasen Furer <m_github@0x26.net>2023-01-30 19:20:11 -0800
committerGitHub <noreply@github.com>2023-01-30 19:20:11 -0800
commit0a7ce8baf48ab51ab8b7ebd5ec5e95fe7713466a (patch)
tree1772e5b294a8a1b0e4fe000954fb3f94c694cc55
parenta77d1376de0c486f709343c37026e006985616b1 (diff)
downloadtox-git-0a7ce8baf48ab51ab8b7ebd5ec5e95fe7713466a.tar.gz
docs/faq.rst: clarify how constrain_package_deps works (#2902)
-rw-r--r--docs/faq.rst20
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.