-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot resolve python=^3.4 with httpx #3878
Comments
This is quite odd. The following test in test_solver.py succeeds. def test_solver_sub_dependencies_with_not_supported_python_version_x(
solver, repo, package
):
# uncomment for live test
# from poetry.repositories.pypi_repository import PyPiRepository
# solver._pool = Pool([PyPiRepository()])
# solver.provider._pool = solver._pool
solver.provider.set_package_python_versions("^3.4")
package.add_dependency(
Factory.create_dependency("httpx", {"version": "^0.17.1", "python": "^3.6"})
)
httpx = get_package("httpx", "0.17.1")
httpx.python_versions = ">=3.6"
httpcore = get_package("httpcore", "0.12.3")
httpcore.python_versions = ">=3.6"
sniffio = get_package("sniffio", "1.2.0")
sniffio.python_versions = ">=3.5"
httpx.add_dependency(Factory.create_dependency("httpcore", {"version": ">=0.12.1,<0.13"}))
httpx.add_dependency(Factory.create_dependency("sniffio", {"version": "*"}))
httpcore.add_dependency(Factory.create_dependency("sniffio", {"version": "==1.*"}))
repo.add_package(httpx)
repo.add_package(httpcore)
repo.add_package(sniffio)
ops = solver.solve()
check_solver_result(ops, [
{'job': 'install', 'package': sniffio, 'skipped': False},
{'job': 'install', 'package': httpcore, 'skipped': False},
{'job': 'install', 'package': httpx, 'skipped': False}
]) However, uncommenting the top bit to enable a live test fails. Seems to be due to how the package gets instantianted for a @sdispater any thoughts on this one? PS: if solving is fixed for the live case, the |
The following test (not live) reproduces the issue: def test_solver_sub_dependencies_with_not_supported_python_version_x(
solver, repo, package
):
solver.provider.set_package_python_versions("^3.4")
package.add_dependency(
Factory.create_dependency("httpx", {"version": "^0.17.1", "python": "^3.6"})
)
httpx = get_package("httpx", "0.17.1")
httpx.python_versions = ">=3.6"
httpcore = get_package("httpcore", "0.12.3")
httpcore.python_versions = ">=3.6"
sniffio_1_1_0 = get_package("sniffio", "1.1.0")
sniffio_1_1_0.python_versions = ">=3.5"
sniffio = get_package("sniffio", "1.2.0")
sniffio.python_versions = ">=3.5"
httpx.add_dependency(
Factory.create_dependency("httpcore", {"version": ">=0.12.1,<0.13"})
)
httpx.add_dependency(Factory.create_dependency("sniffio", {"version": "*"}))
httpcore.add_dependency(Factory.create_dependency("sniffio", {"version": "==1.*"}))
repo.add_package(httpx)
repo.add_package(httpcore)
repo.add_package(sniffio)
repo.add_package(sniffio_1_1_0)
ops = solver.solve()
check_solver_result(
ops,
[
{"job": "install", "package": sniffio, "skipped": False},
{"job": "install", "package": httpcore, "skipped": False},
{"job": "install", "package": httpx, "skipped": False},
],
) The issue comes from the fact that the |
I tracked it down to the I'll make a PR there. |
Relates-to: python-poetry#3878
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
-vvv
option).Issue
It's known that the package
httpx
requires Python>=3.6.I want my package supports Python>=3.4, and, if there's Python>=3.6, depends on httpx, too.
However, it (
poetry lock
) only works when I specifytool.poetry.dependencies.python="^3.X"
whereX
>=5.When I specify
python="^3.4"
,poetry lock
reports aSolverProblemError
.The detail debug info:
The text was updated successfully, but these errors were encountered: