forked from tox-dev/tox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enforce constraints during install_package_deps
Create a constraints file based on the listed or installed ``deps`` and use it during ``install_package_deps`` to ensure the package dependencies do not override the environment's dependencies. Adds new config keys: * ``constrain_package_deps`` - chicken switch to go back to the legacy behavior of allowing the package deps to override the testenv deps * ``use_frozen_constraints`` - a more strict mode, enforced that the package deps do not conflict in any way with the set of packages installed by ``deps`` Fix tox-dev#2386
- Loading branch information
Showing
6 changed files
with
233 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Test environments now recognize boolean config keys ``constrain_package_deps`` (default=true) and ``use_frozen_constraints`` (default=false), | ||
which control how tox generates and applies constraints files when performing ``install_package_deps``. | ||
|
||
If ``constrain_package_deps`` is true (default), then tox will write out ``{env_dir}{/}constraints.txt`` and pass it to | ||
``pip`` during ``install_package_deps``. If ``use_frozen_constraints`` is false (default), the constraints will be taken | ||
from the specifications listed under ``deps`` (and inside any requirements or constraints file referenced in ``deps``). | ||
Otherwise, ``list_dependencies_command`` (``pip freeze``) is used to enumerate exact package specifications which will | ||
be written to the constraints file. | ||
|
||
In previous releases, conflicting package dependencies would silently override the ``deps`` named in the configuration, | ||
resulting in test runs against unexpected dependency versions, particularly when using tox factors to explicitly test | ||
with different versions of dependencies - by :user:`masenf`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters