Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module "jaraco" has no attribute "env" #79

Closed
jaraco opened this issue Aug 26, 2023 · 6 comments
Closed

Module "jaraco" has no attribute "env" #79

jaraco opened this issue Aug 26, 2023 · 6 comments

Comments

@jaraco
Copy link
Owner

jaraco commented Aug 26, 2023

mypy tests have started failing with:

_______________________________________________________________ pip_run/commands.py _______________________________________________________________
7: error: Module "jaraco" has no attribute "env"  [attr-defined]
@jaraco
Copy link
Owner Author

jaraco commented Aug 26, 2023

It's true that the jaraco module doesn't have an attribute env. That is, unless you've installed jaraco.env, in which case, there it is.

@jaraco
Copy link
Owner Author

jaraco commented Aug 26, 2023

And it's present in the test environment where the error occurs:

 pip-run main @ ls .tox/py/lib/python3.11/site-packages/jaraco
__pycache__ context.py  env.py      functools   path.py     test        text

@jaraco
Copy link
Owner Author

jaraco commented Aug 26, 2023

According to this answer, it's a known bug in mypy since 0.700, but that doesn't explain why tests passed three weeks ago.

@jaraco
Copy link
Owner Author

jaraco commented Aug 26, 2023

I don't see anything relevant in the changelog (after a brief scan and search for 'import').

@jaraco
Copy link
Owner Author

jaraco commented Aug 26, 2023

Downgrading to mypy 1.4.1 bypasses the failure.

I tried downgrading to 1.4.1 and I thought the problem was fixed, but I'd forgotten I'd put another workaround in place (re-wording the import).

Maybe the change is due to the introduction of py.typed to jaraco.functools.

@jaraco
Copy link
Owner Author

jaraco commented Aug 26, 2023

Indeed, downgrading jaraco.functools to <3.9 works around the issue, implicating jaraco/jaraco.functools#22.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant