I seem to be bit by the same `typing_extensions` m...
# general
b
I seem to be bit by the same
typing_extensions
missing import from Pants after a new bootstrap on 2.11.0rc1
Copy code
]
[Step 8/9] + ./pants --pants-config-files=pants.ci.toml --changed-since=origin/master --changed-dependees=transitive test
...
[Step 8/9]   File "/home/buildagent/.cache/pants/setup/bootstrap-Linux-x86_64/2.11.0rc1_py38/lib/python3.8/site-packages/pants/util/dirutil.py", line 18, in <module>
[Step 8/9]     from typing_extensions import Literal
[Step 8/9] ModuleNotFoundError: No module named 'typing_extensions'
I have a suspicion that this only occurs when the bootstrap is done in a subprocess of an existing Python process with
typing_extensions
in it.
If I remove
--quiet
from the
pip install
in the bootstrap script:
Copy code
Requirement already satisfied: typing-extensions==4.0.1 in /some/path/to/typing_extensions (from pantsbuild.pants==2.11.0rc1) (4.0.1)
Should the bootstrap script use:
Copy code
-I, --ignore-installed      Ignore the installed packages, overwriting them. This can break your system if the existing package is of a different version or was
                              installed with a different package manager!
👀 1
I'm gonna apply my PR locally to unblock my work task. If @hundreds-father-404 or @enough-analyst-54434 or @polite-garden-50641 has a free cycle to quickly look at the PR to ensure I'm not doing something dumb I'd greatly appreciate it ❤️
👍 1
e
I took a look. Your fix is probably fine, but this is another case - for me - of no clue what's actually going on here. I never ever like that.
👍 1
b
Looks like
pip
is using
PYTHONPATH
and thinking deps are installed.
e
Ah - MUCH better! So then, should PYTHONPATH just be unset? We already scrub PEX env vars to avoid contamination.
b
That would also work
I think?
e
It definitely would work and it would actually make sense locally. The current fix makes no sense locally as pointed out in my PR comments.
1