Commit a05a1a86 by Sébastien Eustace

Fix dependency resolution for Python-restricted dependencies

parent 8c31f923
......@@ -331,7 +331,7 @@ class Provider:
# In this particular case, we notify the resolver that it needs
# to branch the dependency tree. What this means is if we have
# 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 (
not package.dependency.python_constraint.is_any()
and not package.python_constraint.intersect(
......@@ -343,12 +343,12 @@ class Provider:
package, package.dependency.python_constraint
)
)
intersection = self._package.python_constraint.intersect(
package.dependency.python_constraint
)
raise CompatibilityError(
str(
package.python_constraint.intersect(
package.dependency.python_constraint
)
)
str(intersection),
str(self._package.python_constraint.difference(intersection)),
)
return [
......
......@@ -22,7 +22,7 @@ classifiers = [
# Requirements
[tool.poetry.dependencies]
python = "~2.7.9 || ^3.4"
python = "~2.7 || ^3.4"
cleo = "^0.6.7"
requests = "^2.18"
cachy = "^0.2"
......@@ -47,7 +47,7 @@ virtualenv = { version = "^16.0", python = "~2.7" }
[tool.poetry.dev-dependencies]
pytest = "^3.4"
pytest-cov = "^2.5"
mkdocs = "^1.0"
mkdocs = { version = "^1.0", python = "~2.7.9 || ^3.4" }
pymdown-extensions = "^4.9"
pygments = "^2.2"
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