Just hit this in our CI: ```[17:04:07] File "/ho...
# development
b
Just hit this in our CI:
Copy code
[17:04:07]
  File "/home/buildagent/.cache/pants/setup/bootstrap-Linux-x86_64/2.10.0rc2_py38/lib/python3.8/site-packages/pants/util/dirutil.py", line 18, in <module>
[17:04:07]
    from typing_extensions import Literal
[17:04:07]
ModuleNotFoundError: No module named 'typing_extensions'
Does that import belong behind a
if TYPE_CHECKING
?
Odd I'm only seeing this... in certain circumstances
I guess it doesn't belong behind an if type checking: https://github.com/pantsbuild/pants/search?q=typing_extensions
w
More like:
Copy code
try:
    from typing import Literal
except ImportError:
    from typing_extensions import Literal
typing_extensions
is just for 3.7, correct?
b
Well it should always be in
typing_extensions
I think this is an installation issue 😐
I think they continuously add things to
typing_extensions
so no?
w
Hmm, I thought
typing_extensions
needed to be pip installed. I've literally never used it. I use
from typing
and future imports for all my typed needs.
I mean, if typing_extensions is present, then yes, I think it should be fine - so this is strange
b
I'm running pants in a subprocess on this machine earlier in CI and have no issues. Something is amiss
I wonder if PYTHOPATH is set to something that has the library, so when my subprocess executes it inherits it. When I invoke pants directly it doesn't? Gahh too many variables 🙃
OK I can confirm
typing_extensions
is not in
~/.cache/pants/setup/bootstrap-Linux-x86_64/2.10.0rc2_py38/lib/python3.8/site-packages
I wonder if PYTHOPATH is set to something that has the library, so when my subprocess executes it inherits it. When I invoke pants directly it doesn't?
I think this is exactly what's happening.
Yes it seems to be an installation issue. Very weird.