ancient-france-42909
08/20/2022, 8:13 PM2.4.15
, which needs python 3.7 (which is what our repo is supposed to use). When I try to generate a lockfile it says:
ERROR: Could not find a version that satisfies the requirement pylint>=2.14.5
ERROR: No matching distribution found for pylint>=2.14.5
If I look in the logs, it says it’s using 3.7.4 to bootstrap the env, and if I check in the sandbox, the pex file is python 3.7.4. But if I run __run.sh
, it gets changed to 3.6.8 (this was a pyenv artifact). If I use the pex from the sandbox folder to get pylint, it works. If I run __run.sh
, it obviously stops working. There’s also nothing in the log file mentioned in the command line printed. How can I debug/fix this, except by uninstalling any <3.6
I have?Failed to spawn a job for /Users/cris.birzan/.pyenv/versions/3.7.4/envs/crpython-3.7/bin/python: [Errno 7] Argument list too long: '/Users/cris.birzan/.cache/pants/named_caches/pex_root/venvs/c9e55cc98846b062ba9676b3c1a5214512602544/9e8a8413acb01e6e9c00d46a84284b42001f4885/bin/python'
enough-analyst-54434
08/20/2022, 8:32 PM./pants generate-lockfiles --resolve=pylint -ldebug
ancient-france-42909
08/20/2022, 8:34 PMenough-analyst-54434
08/20/2022, 8:38 PM"./pex", "lock", "create", ..., "--interpreter-constraint", "CPython==3.7.*"
You need to adjust your interpreter-constraint from CPython==3.7.*
CPython>=3.7.2,<3.8
>=3.7.2
ancient-france-42909
08/20/2022, 8:39 PMenough-analyst-54434
08/20/2022, 8:39 PMI seriously doubt that’s the case.You seriously doubt what is the case?
ancient-france-42909
08/20/2022, 8:40 PM>=3.7.4
enough-analyst-54434
08/20/2022, 8:40 PMancient-france-42909
08/20/2022, 8:41 PMenough-analyst-54434
08/20/2022, 8:42 PM--interpreter-constraint CPython==3.7.* --interpreter-constraint CPython>=3.7.4
- that implies you have ICs defined also in BUILD files somewhere.ancient-france-42909
08/20/2022, 8:45 PM>=3.7.4
is more specific than ==3.7.*
.~=3.7.4
enough-analyst-54434
08/20/2022, 8:47 PMancient-france-42909
08/20/2022, 8:48 PMenough-analyst-54434
08/20/2022, 8:48 PMancient-france-42909
08/20/2022, 8:50 PMenough-analyst-54434
08/20/2022, 8:50 PM--interpreter-constraint INTERPRETER_CONSTRAINT
Constrain the selected Python interpreter. Specify with Requirement-style syntax, e.g. "CPython>=2.7,<3" (A CPython interpreter with version >=2.7 AND version <3), ">=2.7,<3" (Any Python interpreter with version >=2.7 AND version <3) or "PyPy" (A
PyPy interpreter of any version). This argument may be repeated multiple times to OR the constraints. Try `PEX_TOOLS=1 /home/jsirois/.venv/pex/bin/python3 /home/jsirois/.venv/pex/bin/pex interpreter --verbose --indent 4` to find the exact
interpreter constraints of /home/jsirois/.venv/pex/bin/python3 and `PEX_TOOLS=1 /home/jsirois/.venv/pex/bin/pex interpreter --all --verbose --indent 4` to find out the interpreter constraints of all Python interpreters on the $PATH. (default: [])
So Pants may be doing the wrong thing here for sure.ancient-france-42909
08/20/2022, 8:51 PMenough-analyst-54434
08/20/2022, 8:51 PMIt’s not my fault it takes 20 minutes to generate lockfiles.But it is you coming across a bit whiny. I realize you're not happy. I hope you realize I'm working hard here to help you.
ancient-france-42909
08/20/2022, 8:56 PMenough-analyst-54434
08/20/2022, 8:57 PM--resolve=pylint
ancient-france-42909
08/20/2022, 8:58 PM==3.7.*
constraint. (Which, in my defense, was added last night) This is for trying to lint, to see if this actually fixes the namespaces issueenough-analyst-54434
08/20/2022, 8:59 PMancient-france-42909
08/20/2022, 8:59 PMenough-analyst-54434
08/20/2022, 9:00 PMancient-france-42909
08/20/2022, 9:02 PMenough-analyst-54434
08/20/2022, 9:02 PMancient-france-42909
08/20/2022, 9:30 PMenough-analyst-54434
08/20/2022, 9:38 PMancient-france-42909
08/20/2022, 9:39 PMenough-analyst-54434
08/20/2022, 9:39 PMlib
missing in a module. That could certainly mean ns package issue, but maybe it means something more subtle.ancient-france-42909
08/20/2022, 9:42 PMenough-analyst-54434
08/20/2022, 10:06 PM"pylint @ git+<https://github.com/PyCQA/pylint/commit/2fafadc8aca1831c594cafd35a46b691eaa3e357>"
as your custom pylint version.ancient-france-42909
08/20/2022, 10:07 PMenough-analyst-54434
08/20/2022, 10:07 PMancient-france-42909
08/20/2022, 10:08 PMenough-analyst-54434
08/20/2022, 10:08 PMancient-france-42909
08/20/2022, 10:09 PMenough-analyst-54434
08/20/2022, 10:09 PMancient-france-42909
08/20/2022, 10:10 PMenough-analyst-54434
08/20/2022, 10:10 PMancient-france-42909
08/20/2022, 10:12 PMWARNING: Discarding git+<https://github.com/PyCQA/pylint/commit/2fafadc8aca1831c594cafd35a46b691eaa3e357>. Command errored out with exit status 128: git clone -q <https://github.com/PyCQA/pylint/commit/2fafadc8aca1831c594cafd35a46b691eaa3e357> /Users/cris.birzan@tessian.com/.cache/pants/named_caches/pex_root/pip_cache/.tmp/pip-download-pmbr7jx7/pylint_b7e500279f75437f91a114cebfd68968 Check the logs for full command output.
pylint@git+<https://github.com/PyCQA/pylint.git@2fafadc8aca1831c594cafd35a46b691eaa3e357>
worked.enough-analyst-54434
08/20/2022, 10:14 PM#egg=pylint
to the end of the vcs URL if so.ancient-france-42909
08/20/2022, 10:17 PMenough-analyst-54434
08/20/2022, 10:18 PMancient-france-42909
08/20/2022, 10:33 PM2.12.2
, but I still get the errors 😞 But, I’m gonna try harder to find out how to reproduce this. For example, in the sandbox, if I run pylint on all the files, I get the error. If I just run it on the ones that have an error, I don’t. So I’ll just start trying to add files and see when it errors outenough-analyst-54434
08/20/2022, 10:37 PMancient-france-42909
08/20/2022, 10:37 PMaudit/lib/tests/unit/test_validate_event.py
common/audit/src/common/audit/__init__.py
enough-analyst-54434
08/20/2022, 10:39 PMancient-france-42909
08/20/2022, 10:40 PMaudit
in another namespace, and that’s what’s causing the issue.common
is not in the path, nor is common/audit/src/common
so you could find something called audit
enough-analyst-54434
08/20/2022, 10:43 PM__init__.py
at all (to me), I thought this was all PEP-420 implicit ns packages / no dunder-inits.ancient-france-42909
08/20/2022, 10:47 PMis_namespace
from astroid returns true.enough-analyst-54434
08/20/2022, 10:51 PMancient-france-42909
08/20/2022, 11:00 PMenough-analyst-54434
08/20/2022, 11:00 PMancient-france-42909
08/20/2022, 11:01 PMenough-analyst-54434
08/20/2022, 11:02 PMancient-france-42909
08/20/2022, 11:02 PMenough-analyst-54434
08/20/2022, 11:05 PMancient-france-42909
08/20/2022, 11:07 PMenough-analyst-54434
08/20/2022, 11:08 PMancient-france-42909
08/20/2022, 11:50 PMenough-analyst-54434
08/21/2022, 12:06 AMancient-france-42909
08/21/2022, 12:07 AMenough-analyst-54434
08/22/2022, 7:19 PMaudit/lib/tests/unit/test_validate_event.py:73:24: E1101: Module 'audit' has no 'lib' member (no-member)
I.E.: E1101 and not E0401 or E0611ancient-france-42909
08/22/2022, 7:20 PMaudit.lib
there, vs import audit; audit.lib
enough-analyst-54434
08/22/2022, 7:22 PMancient-france-42909
08/22/2022, 7:23 PMenough-analyst-54434
08/22/2022, 7:24 PM