https://pantsbuild.org/ logo
#development
Title
# development
b

bitter-ability-32190

02/02/2022, 9:42 PM
Failed to resolve requirements from PEX environment
after updating pytest's lockfile ๐Ÿงต
Copy code
pex.environment.ResolveError: Failed to resolve requirements from PEX environment @ /home/joshuacannon/.cache/pants/named_caches/pex_root/unzipped_pexes/5918a34c14177ea9a979e86f8a556bfecdb91156.
Needed manylinux_2_31_x86_64-cp-38-cp38 compatible dependencies for:
 1: typing-extensions>=3.10
    Required by:
      FingerprintedDistribution(distribution=mypy 0.931 (/home/joshuacannon/.cache/pants/named_caches/pex_root/installed_wheels/dba94d8815514f1ecbd1eea18a996153625656b7/mypy-0.931-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl), fingerprint='400fe5643e0a58ecedf0f0d82e59390857502bad')
    But this pex had no 'typing-extensions' distributions.
the lockfile has
typing-extensions==4.0.1;
All that changed in
toml
is adding
Copy code
"pytest-mypy-testing",
  "mypy",
h

hundreds-father-404

02/02/2022, 9:44 PM
this is in your own repo or pantsbuild/pants? @polite-garden-50641 has experienced similar things, I haven't been able to figure it out yet
b

bitter-ability-32190

02/02/2022, 9:44 PM
pantsbuild repo
Explicitly setting
typing-extensions
seemed to work
Bummer it produced a lockfile thats seemingly unsatisfiable
h

hundreds-father-404

02/02/2022, 9:46 PM
Ah that's an interesting angle if Poetry is producing a bad lockfile. Sounds like the lockfile did change when you added typing-extensions, right?
b

bitter-ability-32190

02/02/2022, 9:49 PM
Yes
h

hundreds-father-404

02/02/2022, 9:50 PM
Okay interesting. Do note that Poetry's resolver != Pex's (pip's) resolver. It's inherently not sound that we use Poetry to generate lockfiles for pip.... But, we needed to be pragmatic with 2.7's tool lockfiles that Pants needed to automatically generate lockfiles; Poetry > pip-compile, and Pex didn't have the ability to generate. So we went with Poetry, despite the flaws, while John has been doing amazing work to teach pex to generate lockfiles
๐Ÿ™Œ 1