Commit a05a1a86 by Sébastien Eustace

Fix dependency resolution for Python-restricted dependencies

parent 8c31f923
...@@ -331,7 +331,7 @@ class Provider: ...@@ -331,7 +331,7 @@ class Provider:
# In this particular case, we notify the resolver that it needs # In this particular case, we notify the resolver that it needs
# to branch the dependency tree. What this means is if we have # to branch the dependency tree. What this means is if we have
# root Python ~2.7 || ^3.6 and dependency Python >=3.6 # root Python ~2.7 || ^3.6 and dependency Python >=3.6
# we have to resolve for ^3.6 (>=3.6, <4.0) # we have to resolve for ^3.6 (>=3.6, <4.0) and for ~2.7 || <3.6
if ( if (
not package.dependency.python_constraint.is_any() not package.dependency.python_constraint.is_any()
and not package.python_constraint.intersect( and not package.python_constraint.intersect(
...@@ -343,12 +343,12 @@ class Provider: ...@@ -343,12 +343,12 @@ class Provider:
package, package.dependency.python_constraint package, package.dependency.python_constraint
) )
) )
raise CompatibilityError( intersection = self._package.python_constraint.intersect(
str(
package.python_constraint.intersect(
package.dependency.python_constraint package.dependency.python_constraint
) )
) raise CompatibilityError(
str(intersection),
str(self._package.python_constraint.difference(intersection)),
) )
return [ return [
......
...@@ -22,7 +22,7 @@ classifiers = [ ...@@ -22,7 +22,7 @@ classifiers = [
# Requirements # Requirements
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = "~2.7.9 || ^3.4" python = "~2.7 || ^3.4"
cleo = "^0.6.7" cleo = "^0.6.7"
requests = "^2.18" requests = "^2.18"
cachy = "^0.2" cachy = "^0.2"
...@@ -47,7 +47,7 @@ virtualenv = { version = "^16.0", python = "~2.7" } ...@@ -47,7 +47,7 @@ virtualenv = { version = "^16.0", python = "~2.7" }
[tool.poetry.dev-dependencies] [tool.poetry.dev-dependencies]
pytest = "^3.4" pytest = "^3.4"
pytest-cov = "^2.5" pytest-cov = "^2.5"
mkdocs = "^1.0" mkdocs = { version = "^1.0", python = "~2.7.9 || ^3.4" }
pymdown-extensions = "^4.9" pymdown-extensions = "^4.9"
pygments = "^2.2" pygments = "^2.2"
pytest-mock = "^1.9" pytest-mock = "^1.9"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment