Hello all I am facing a strange behaviour with pa...
# general
d
Hello all I am facing a strange behaviour with pants. I have started a PoC python nomorepo a couple of months ago, but I had to let it aside until now. Yesterday I tried to regenerated the lock-files, without having change anything and now pants is not able to do it because a conflict between pants and another library.
Copy code
pantsbuild-pants 2.19.0 depends on typing-extensions==4.3.0
fastapi 0.110.3 depends on typing-extensions>=4.8.0
I am opening a thread to put more details
As I said the pants version is the same..I started with 2.19.0 I was adding a gitlab pipeline to the project and I decided to update the pants version to 2.21.0, then I saw incompatibilities between pants and my code dependencies. I tried to update the lock files and then all the problem arise. So I cleared all caches, switch back to 2.19.0 and then ...
Copy code
2.19.0

stderr:
pid 93066 -> /Users/albertocasado/.cache/pants/named_caches/pex_root/venvs/df773647d6083b93c874a7ce1b736a536cac4192/bf23592afc6bbf9e59da204a4c864270f9819638/bin/python -sE /Users/albertocasado/.cache/pants/named_caches/pex_root/venvs/df773647d6083b93c874a7ce1b736a536cac4192/bf23592afc6bbf9e59da204a4c864270f9819638/pex --disable-pip-version-check --no-python-version-warning --exists-action a --no-input --isolated -q --cache-dir /Users/albertocasado/.cache/pants/named_caches/pex_root/pip/23.1.2/pip_cache --log /private/var/folders/2g/czyjmf0n2nq9ztsn5xq_q71h0000gp/T/pants-sandbox-SI2TCM/.tmp/pex-pip-log.16is71y8/pip.log download --dest /private/var/folders/2g/czyjmf0n2nq9ztsn5xq_q71h0000gp/T/pants-sandbox-SI2TCM/.tmp/tmp15am5m0u/opt.homebrew.Cellar.python@3.9.3.9.18_1.Frameworks.Python.framework.Versions.3.9.bin.python3.9 asynctest<0.14.0,>=0.13.0 cachetools<4.2.0,>=4.1.1 confluent-kafka<1.10.0,>=1.9.2 fastapi<0.111.0,>=0.110.0 freezegun<1.3.0,>=1.2.2 geoip2>=4 jmespath<0.11.0,>=0.10.0 msgpack-types<0.3.0,>=0.2.0 msgpack<0.7.0,>=0.6.1 mysqlclient<2.2.0,>=2.1.1 orjson<3.10.0,>=3.9.15 pantsbuild.pants.testutil==2.19.0 pantsbuild.pants==2.19.0 psycopg2-binary<2.10.0,>=2.9.6 pydantic<2,>=1 pytest-benchmark<3.5.0,>=3.4.1 pytest-cov<3.1.0,>=3.0.0 pytest-mock<3.7.0,>=3.6.1 pytz<2025.0.0,>=2024.1 pyyaml<6.1.0,>=6.0.1 redis<5.1.0,>=5.0.0 requests>=2.24.0 sentry-sdk<1.29.0,>=1.28.1 sphinx-rtd-theme<1.1.0,>=1.0.0 sphinx<4.4.0,>=4.3.2 statsd<4.1.0,>=4.0.1 tenacity<8.3.0,>=8.2.2 testcontainers-kafka<0.0.2,>=0.0.1rc1 testcontainers-mysql<0.0.2,>=0.0.1rc1 testcontainers-nginx<0.0.2,>=0.0.1rc1 testcontainers-redis<0.0.2,>=0.0.1rc1 types-cachetools<6.0.0,>=5.3.0.7 types-dataclasses<0.7.0,>=0.6.6 types-jmespath<2.0.0,>=1.0.2.20240106 types-mysqlclient<3.0.0,>=2.2.0.20240311 types-psycopg2<3.0.0,>=2.9.21.20240311 types-pytz<2025.0.0,>=2024.1.0.20240203 types-pyyaml>6 types-requests<3.0.0,>=2.31.0.20240311 ua-parser<0.17.0,>=0.16.1 user-agents<2.3.0,>=2.2.0 voluptuous-stubs<0.2.0,>=0.1.1 voluptuous<0.14.0,>=0.13.1 --index-url <https://pypi.org/simple/> --find-links <https://wheels.pantsbuild.org/simple> --retries 5 --timeout 15 exited with 1 and STDERR:
ERROR: Cannot install fastapi==0.110.0, fastapi==0.110.1, fastapi==0.110.2, fastapi==0.110.3 and pantsbuild-pants==2.19.0 because these package versions have conflicting dependencies.
ERROR: ResolutionImpossible: for help visit <https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts>
 
 The conflict is caused by:
     pantsbuild-pants 2.19.0 depends on typing-extensions==4.3.0
     fastapi 0.110.3 depends on typing-extensions>=4.8.0
     pantsbuild-pants 2.19.0 depends on typing-extensions==4.3.0
     fastapi 0.110.2 depends on typing-extensions>=4.8.0
     pantsbuild-pants 2.19.0 depends on typing-extensions==4.3.0
     fastapi 0.110.1 depends on typing-extensions>=4.8.0
     pantsbuild-pants 2.19.0 depends on typing-extensions==4.3.0
     fastapi 0.110.0 depends on typing-extensions>=4.8.0
 
 To fix this you could try to:
 1. loosen the range of package versions you've specified
 2. remove package versions to allow pip attempt to solve the dependency conflict
so with 2.19.0 that I generated the lock file I have, now it is not working.. trying back 2.21.9
Copy code
stderr:
pid 83875 -> /Users/albertocasado/.cache/pants/named_caches/pex_root/venvs/0deb89b23adbbad7a5b9aac06d2362acf7572cfa/bf23592afc6bbf9e59da204a4c864270f9819638/bin/python -sE /Users/albertocasado/.cache/pants/named_caches/pex_root/venvs/0deb89b23adbbad7a5b9aac06d2362acf7572cfa/bf23592afc6bbf9e59da204a4c864270f9819638/pex --disable-pip-version-check --no-python-version-warning --exists-action a --no-input --isolated -q --cache-dir /Users/albertocasado/.cache/pants/named_caches/pex_root/pip/24.0/pip_cache --log /private/var/folders/2g/czyjmf0n2nq9ztsn5xq_q71h0000gp/T/pants-sandbox-vf1PaT/.tmp/pex-pip-log.6xtq8awx/pip.log download --dest /private/var/folders/2g/czyjmf0n2nq9ztsn5xq_q71h0000gp/T/pants-sandbox-vf1PaT/.tmp/tmp2turfz90/opt.homebrew.Cellar.python@3.9.3.9.18_1.Frameworks.Python.framework.Versions.3.9.bin.python3.9 asynctest<0.14.0,>=0.13.0 cachetools<4.2.0,>=4.1.1 confluent-kafka<1.10.0,>=1.9.2 fastapi<0.111.0,>=0.110.0 freezegun<1.3.0,>=1.2.2 geoip2>=4 jmespath<0.11.0,>=0.10.0 msgpack-types<0.3.0,>=0.2.0 msgpack<0.7.0,>=0.6.1 mysqlclient<2.2.0,>=2.1.1 orjson<3.10.0,>=3.9.15 pantsbuild.pants.testutil==2.21.0 pantsbuild.pants==2.21.0 psycopg2-binary<2.10.0,>=2.9.6 pydantic<2,>=1 pytest-benchmark<3.5.0,>=3.4.1 pytest-cov<3.1.0,>=3.0.0 pytest-mock<3.7.0,>=3.6.1 pytz<2025.0.0,>=2024.1 pyyaml<6.1.0,>=6.0.1 redis<5.1.0,>=5.0.0 requests>=2.24.0 sentry-sdk<1.29.0,>=1.28.1 sphinx-rtd-theme<1.1.0,>=1.0.0 sphinx<4.4.0,>=4.3.2 statsd<4.1.0,>=4.0.1 tenacity<8.3.0,>=8.2.2 testcontainers-kafka<0.0.2,>=0.0.1rc1 testcontainers-mysql<0.0.2,>=0.0.1rc1 testcontainers-nginx<0.0.2,>=0.0.1rc1 testcontainers-redis<0.0.2,>=0.0.1rc1 types-cachetools<6.0.0,>=5.3.0.7 types-dataclasses<0.7.0,>=0.6.6 types-jmespath<2.0.0,>=1.0.2.20240106 types-mysqlclient<3.0.0,>=2.2.0.20240311 types-psycopg2<3.0.0,>=2.9.21.20240311 types-pytz<2025.0.0,>=2024.1.0.20240203 types-pyyaml<7.0.0,>=6.0.12.20240311 types-requests<3.0.0,>=2.31.0.20240311 ua-parser<0.17.0,>=0.16.1 user-agents<2.3.0,>=2.2.0 voluptuous-stubs<0.2.0,>=0.1.1 voluptuous<0.14.0,>=0.13.1 --index-url <https://pypi.org/simple/> --find-links <https://wheels.pantsbuild.org/simple> --retries 5 --timeout 15 exited with 1 and STDERR:
ERROR: Cannot install pantsbuild-pants==2.21.0 and types-pyyaml<7.0.0 and >=6.0.12.20240311 because these package versions have conflicting dependencies.
ERROR: ResolutionImpossible: for help visit <https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts>
 
 The conflict is caused by:
     The user requested types-pyyaml<7.0.0 and >=6.0.12.20240311
     pantsbuild-pants 2.21.0 depends on types-PyYAML==6.0.3
 
 To fix this you could try to:
 1. loosen the range of package versions you've specified
 2. remove package versions to allow pip attempt to solve the dependency conflict




Use `--keep-sandboxes=on_failure` to preserve the process chroot for inspection.
but if I relax de pypyaml dependency then the one for typing-extensions come back
Copy code
stderr:
pid 30450 -> /Users/albertocasado/.cache/pants/named_caches/pex_root/venvs/0deb89b23adbbad7a5b9aac06d2362acf7572cfa/bf23592afc6bbf9e59da204a4c864270f9819638/bin/python -sE /Users/albertocasado/.cache/pants/named_caches/pex_root/venvs/0deb89b23adbbad7a5b9aac06d2362acf7572cfa/bf23592afc6bbf9e59da204a4c864270f9819638/pex --disable-pip-version-check --no-python-version-warning --exists-action a --no-input --isolated -q --cache-dir /Users/albertocasado/.cache/pants/named_caches/pex_root/pip/24.0/pip_cache --log /private/var/folders/2g/czyjmf0n2nq9ztsn5xq_q71h0000gp/T/pants-sandbox-wUTgcO/.tmp/pex-pip-log.fxdj3zex/pip.log download --dest /private/var/folders/2g/czyjmf0n2nq9ztsn5xq_q71h0000gp/T/pants-sandbox-wUTgcO/.tmp/tmpldt08hd6/opt.homebrew.Cellar.python@3.9.3.9.18_1.Frameworks.Python.framework.Versions.3.9.bin.python3.9 asynctest<0.14.0,>=0.13.0 cachetools<4.2.0,>=4.1.1 confluent-kafka<1.10.0,>=1.9.2 fastapi<0.111.0,>=0.110.0 freezegun<1.3.0,>=1.2.2 geoip2>=4 jmespath<0.11.0,>=0.10.0 msgpack-types<0.3.0,>=0.2.0 msgpack<0.7.0,>=0.6.1 mysqlclient<2.2.0,>=2.1.1 orjson<3.10.0,>=3.9.15 pantsbuild.pants.testutil==2.21.0 pantsbuild.pants==2.21.0 psycopg2-binary<2.10.0,>=2.9.6 pydantic<2,>=1 pytest-benchmark<3.5.0,>=3.4.1 pytest-cov<3.1.0,>=3.0.0 pytest-mock<3.7.0,>=3.6.1 pytz<2025.0.0,>=2024.1 pyyaml<6.1.0,>=6.0.1 redis<5.1.0,>=5.0.0 requests>=2.24.0 sentry-sdk<1.29.0,>=1.28.1 sphinx-rtd-theme<1.1.0,>=1.0.0 sphinx<4.4.0,>=4.3.2 statsd<4.1.0,>=4.0.1 tenacity<8.3.0,>=8.2.2 testcontainers-kafka<0.0.2,>=0.0.1rc1 testcontainers-mysql<0.0.2,>=0.0.1rc1 testcontainers-nginx<0.0.2,>=0.0.1rc1 testcontainers-redis<0.0.2,>=0.0.1rc1 types-cachetools<6.0.0,>=5.3.0.7 types-dataclasses<0.7.0,>=0.6.6 types-jmespath<2.0.0,>=1.0.2.20240106 types-mysqlclient<3.0.0,>=2.2.0.20240311 types-psycopg2<3.0.0,>=2.9.21.20240311 types-pytz<2025.0.0,>=2024.1.0.20240203 types-pyyaml<7.0.0,>=6.0.0 types-requests<3.0.0,>=2.31.0.20240311 ua-parser<0.17.0,>=0.16.1 user-agents<2.3.0,>=2.2.0 voluptuous-stubs<0.2.0,>=0.1.1 voluptuous<0.14.0,>=0.13.1 --index-url <https://pypi.org/simple/> --find-links <https://wheels.pantsbuild.org/simple> --retries 5 --timeout 15 exited with 1 and STDERR:
ERROR: Cannot install fastapi==0.110.0, fastapi==0.110.1, fastapi==0.110.2, fastapi==0.110.3 and pantsbuild-pants==2.21.0 because these package versions have conflicting dependencies.
ERROR: ResolutionImpossible: for help visit <https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts>
 
 The conflict is caused by:
     pantsbuild-pants 2.21.0 depends on typing-extensions==4.3.0
     fastapi 0.110.3 depends on typing-extensions>=4.8.0
     pantsbuild-pants 2.21.0 depends on typing-extensions==4.3.0
     fastapi 0.110.2 depends on typing-extensions>=4.8.0
     pantsbuild-pants 2.21.0 depends on typing-extensions==4.3.0
     fastapi 0.110.1 depends on typing-extensions>=4.8.0
     pantsbuild-pants 2.21.0 depends on typing-extensions==4.3.0
     fastapi 0.110.0 depends on typing-extensions>=4.8.0
 
 To fix this you could try to:
 1. loosen the range of package versions you've specified
 2. remove package versions to allow pip attempt to solve the dependency conflict
w
Don't think this specifically is affecting you, but the extensions were recently changed:
Copy code
- typing-extensions==4.3.0
+ typing-extensions~=4.12
Can you put your requirements.txt file somewhere? I can try to run it on my machine