Hello everyone. I am running into a small issue wi...
# general
s
Hello everyone. I am running into a small issue with my python interpreters today when running pants commands. Hoping someone here has seen this before. I am on pants
2.5.0
running in a python
3.9.6
pyenv environment. I also have python
3.8.11
and python
3.6.12
installed via pyenv as we need those versions for our interpreter constraints for some of our servers. pants.toml
Copy code
[python-setup]
resolve_all_constraints = true
interpreter_constraints = ['CPython>=3.6,<3.7']
requirement_constraints = '3rdparty/python/constraints.txt'
interpreter_search_paths = [
    '<PYENV>',
    '<PATH>',
]
It finds the 3.6.12 interpreter but i get errors like this when trying to resolve the constraints.
Copy code
WARNING: Requirement '/tmp/process-executionlIuSO7/.tmp/tmpfyzwz_5c/home.centos..pyenv.versions.3.6.12.bin.python3.6/pyOpenSSL-20.0.1-py2.py3-none-any.whl' looks like a filename, but the file does not exist
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/tmp/process-executionlIuSO7/.tmp/tmpfyzwz_5c/home.centos..pyenv.versions.3.6.12.bin.python3.6/pyOpenSSL-20.0.1-py2.py3-none-any.whl'
Anyone see this before?
After further investigation… The contents of the temp dirs are empty. ITs like it cannot download the 3rd party deps or its putting them somewhere else … then looking for them in the wrong place
more updates… it packages no issues if i set
resolve_all_constraints=false
. maybe specific to only some of the dependencies??
h
Hmm, this is not ringing any bells
s
@happy-kitchen-89482 looks like its only with specific dependencies… and only when they try to resolve.
h
Are you able to reproduce this in a minimal repo that you could expose?
s
@happy-kitchen-89482 Id have to make a dummy repo
h
That would help track this down if it's not too hard to do.
s
i have a feeling this issue could possibly involve how pip is trying to resolve the requirement with diff python versions as interpreter constraints. something with the versions clashing with the dependencies. give me a few… ill make a repo
e
Perhaps that could be short-cutted if you ran with the extra args
-ldebug --pex-verbosity=9
and provided the full logs.
s
i have the repo… just checking if its repro able… but yes ill run with debug real quick and see
https://github.com/NarrativeScience/pants-help.git ☝️ here is the repo to repro use
./pants run help:help
here is the debug log output link: https://github.com/NarrativeScience/pants-help/blob/main/log.txt
h
Thanks!
s
@happy-kitchen-89482 Thank you! hopefully its something simple or on me end.
e
FACEPALM: KeyError: "There is no item named 'PyAthena-1.11.5.dist-info/METADATA' in the archive" So what is a PyAthena?
Ah - ok - found it. This is likely a Pex bug - I need to check the relevant PEP, but even if not technically a bug, Pex needs to accomodate:
Copy code
$ zipinfo PyAthena-1.11.5-py2.py3-none-any.whl | grep METADATA
?rw-r--r--  2.0 unx    32199 b- defN 16-Jan-01 00:00 pyathena-1.11.5.dist-info/METADATA
So the issue is the canonical project name is PyAthena but the dist-info is under pyathen (all lower-case).
Either way I'll file a Pex issue and drop a link here in a bit.
s
@enough-analyst-54434 thank you!
Any idea on ETA till release?
e
I'm going to try hard to knock the bug out and do a Pex release today. I go back into the woods for a while this afternoon, so it's dicey.
🔥 1
s
Thanks @enough-analyst-54434 really appreciate it
e
You're welcome. The 🔥 is a bit close to the bone though. The burning has started out here in the Sierras!
s
@enough-analyst-54434 next time I will use the 💧 🤣
e
I still could not find a spec for dist-info directory name which sort of makes sense since we have an example of that name changing in capitalization over time for PyAthena implying pip or wheel or setuptools has changed their policy over time 😕 The fix should be robust though: https://github.com/pantsbuild/pex/pull/1376
s
thanks @enough-analyst-54434
e
OK, the Pex fix is in but Pants still needs to be upgraded.
s
@enough-analyst-54434 any releases planned that will pick this up?
e
It should go out on the weekly Friday dev release - 2.7.0.dev1. I won't be around to lobby for cherry-picking to other branches, but you could have that discussion with other maintainers.
👍 1
I should have the upgrade PR posted here in a few minutes before I disappear into the woods for the rest of the week+. /cc @witty-crayon-22786 and @hundreds-father-404.
👍 1
1
I probably won't have connectivity to merge this: https://github.com/pantsbuild/pants/pull/12342
✔️ 1
h
I'll resolve conflicts and merge this one.
h
@happy-kitchen-89482 I can finish it if you want, you'll need to use the new
./pants --tag=-lock_ignore lock ::
goal
h
Oh yeah, you should do it
since the conflict is that constraints.txt was deleted
this is your wheelhouse now 🙂
✔️ 1
But this means that we can't easily cherrypick
h
I'll do a dedicated PR for 2.6.x that is not a traditional cherry-pick
s
@hundreds-father-404 sorry its taken me a bit to check back here. finally had the time. Any updates here? did this go out in the latest 2.6 release??
h
Hey @salmon-barista-63163, it has not yet - the Pex upgrade causes some tests to fail and I haven't had time to understand yet what's going on But in the meantime, there's a workaround. Change the
version
and
known_versions
options for https://www.pantsbuild.org/docs/reference-download-pex-bin to these values https://github.com/pantsbuild/pants/pull/12342/files#diff-de25cbd33fc6fadd662c74dd4f16dbc6dc901f58204950751d6363f2bbc5df6a
👍 1
s
Thanks @hundreds-father-404 ill do this and test it out.