gray-quill-76268
12/21/2023, 5:00 PMfile to check the binary, it was in fact x86_64 - I get the same error with arm64.
Has anyone seen this with python3.12 on MacOS, or have any ideas for troubleshooting? The interpreter seems to be working fine when used directly.gray-quill-76268
12/21/2023, 5:18 PMTraceback (most recent call last):
File "<string>", line 4, in <module>
File "/Users/lilyhahn/.cache/pants/named_caches/pex_root/isolated/3754108aac57ec0c996f3414782585924aee601c/pex/atomic_directory.py", line 23, in <module>
from pex.third_party import attr
ImportError: cannot import name 'attr' from 'pex.third_party' (/Users/lilyhahn/.cache/pants/named_caches/pex_root/isolated/3754108aac57ec0c996f3414782585924aee601c/pex/third_party/__init__.py)gray-quill-76268
12/21/2023, 5:25 PMbroad-processor-92400
12/21/2023, 7:25 PMgray-quill-76268
12/21/2023, 7:50 PM[GLOBAL]
pants_version = "2.18.0"
backend_packages.add = [
# "pants.backend.awslambda.python",
"pants.backend.docker",
"pants.backend.docker.lint.hadolint",
"pants.backend.python",
"pants.backend.python.lint.autoflake",
"pants.backend.python.lint.pyupgrade",
"pants.backend.python.lint.black",
"pants.backend.python.lint.flake8",
"pants.backend.python.lint.isort",
"pants.backend.python.lint.docformatter",
# "pants.backend.python.lint.bandit",
"pants.backend.python.lint.pylint",
"pants.backend.python.typecheck.mypy",
"pants.backend.shell",
"pants.backend.shell.lint.shellcheck",
"pants.backend.shell.lint.shfmt",
]
[python]
interpreter_constraints = ["==3.11.*"]
enable_resolves = true
[python.resolves]
pylint = "3rdparty/python/pylint.lock"
python-default = "3rdparty/python/default.lock"
[python.resolves_to_no_binary]
python-default = ["pyspark"]gray-quill-76268
12/21/2023, 7:52 PMpylint seems to come across all sorts of issues with no-member false positives on builtin modules like os and abc when used with 3.11.
It looks like it's using an outdated version of pylint which doesn't support newer versions of Python.
I managed to fix it by creating a resolve which specified pylint>=3.0.0.broad-processor-92400
12/21/2023, 9:50 PM[pex-cli]
version = "2.1.154"
known_versions = [
"..."
]
You'll have to reproduce an appropriate known versions value. One way is using the existing one as inspiration, and changing by downloading the pex file from that release and computing the hash and length and using that to fill out the four rows per platform (same for every platform, the pex file is universal)happy-kitchen-89482
12/22/2023, 10:25 PMbroad-processor-92400
12/28/2023, 5:23 AM