Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
b963b8fb
Unverified
Commit
b963b8fb
authored
Jun 10, 2018
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve debugging of duplicate dependencies
parent
c471b129
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
poetry/puzzle/provider.py
+11
-4
poetry/puzzle/solver.py
+4
-0
No files found.
poetry/puzzle/provider.py
View file @
b963b8fb
...
@@ -423,15 +423,22 @@ class Provider:
...
@@ -423,15 +423,22 @@ class Provider:
# At this point, we raise an exception that will
# At this point, we raise an exception that will
# tell the solver to enter compatibility mode
# tell the solver to enter compatibility mode
# which means it will resolve for each minor
# which means it will resolve for subsets
# Python version supported
# Python constraints
#
# For instance, if our root package requires Python ~2.7 || ^3.6
# And we have one dependency that requires Python <3.6
# and the other Python >=3.6 than the solver will solve
# dependencies for Python >=2.7,<2.8 || >=3.4,<3.6
# and Python >=3.6,<4.0
python_constraints
=
[]
python_constraints
=
[]
for
constraint
,
_deps
in
by_constraint
.
items
():
for
constraint
,
_deps
in
by_constraint
.
items
():
python_constraints
.
append
(
_deps
[
0
]
.
python_versions
)
python_constraints
.
append
(
_deps
[
0
]
.
python_versions
)
_deps
=
[
str
(
_dep
[
0
])
for
_dep
in
by_constraint
.
values
()]
self
.
debug
(
self
.
debug
(
"<warning>
Uncompatible constraints
for {}.</warning>"
.
format
(
"<warning>
Different requirements found
for {}.</warning>"
.
format
(
dep_name
", "
.
join
(
_deps
[:
-
1
])
+
" and "
+
_deps
[
-
1
]
)
)
)
)
raise
CompatibilityError
(
*
python_constraints
)
raise
CompatibilityError
(
*
python_constraints
)
...
...
poetry/puzzle/solver.py
View file @
b963b8fb
...
@@ -91,6 +91,10 @@ class Solver:
...
@@ -91,6 +91,10 @@ class Solver:
constraint
=
parse_constraint
(
constraint
)
constraint
=
parse_constraint
(
constraint
)
intersection
=
constraint
.
intersect
(
self
.
_package
.
python_constraint
)
intersection
=
constraint
.
intersect
(
self
.
_package
.
python_constraint
)
self
.
_provider
.
debug
(
"<comment>Retrying dependency resolution "
"for Python ({}).</comment>"
.
format
(
intersection
)
)
with
self
.
_package
.
with_python_versions
(
str
(
intersection
)):
with
self
.
_package
.
with_python_versions
(
str
(
intersection
)):
for
package
in
self
.
_solve
(
use_latest
=
use_latest
):
for
package
in
self
.
_solve
(
use_latest
=
use_latest
):
if
package
not
in
packages
:
if
package
not
in
packages
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment