-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d758947
commit 853ccf6
Showing
6 changed files
with
94 additions
and
40 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
""" | ||
Backtracking resolver | ||
===================== | ||
Pip has an option to enable `backtracking`_ conflict resolution logic, | ||
which can automatically downgrade some dependencies to meet constraints | ||
from other packages. | ||
See also the `a note on resolvers`_ in ``pip-compile`` project. | ||
.. code-block:: text | ||
--backtracking / --no-backtracking | ||
Enable backtracking resolver. Translates to | ||
pip-compile --resolver=backtracking option. | ||
.. _backtracking: https://pip.pypa.io/en/latest/user_guide/\ | ||
#changes-to-the-pip-dependency-resolver-in-20-3-2020 | ||
.. _a note on resolvers: https://github.com/jazzband/pip-tools#a-note-on-resolvers | ||
""" | ||
|
||
from .base import ClickOption | ||
from .forward import ForwardOption | ||
|
||
|
||
class Backtracking(ForwardOption): | ||
"""Enable backtracking resolver.""" | ||
|
||
OPTION_NAME = 'backtracking' | ||
CLICK_OPTION = ClickOption( | ||
long_option='--backtracking/--no-backtracking', | ||
is_flag=True, | ||
default=False, | ||
help_text='Enable backtracking resolver. Translates to ' | ||
'pip-compile --resolver=backtracking option.' | ||
) | ||
enabled_pin_options = ['--resolver=backtracking'] | ||
disabled_pin_options = ['--resolver=legacy'] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
click | ||
pip-tools>=5.2 | ||
pip-tools>=6.8.0 | ||
toposort |
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