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

0.930: mypyc --help crashes with KeyError: __file__ #11894

Closed
asottile opened this issue Jan 3, 2022 · 2 comments
Closed

0.930: mypyc --help crashes with KeyError: __file__ #11894

asottile opened this issue Jan 3, 2022 · 2 comments
Labels
bug mypy got something wrong

Comments

@asottile
Copy link
Contributor

asottile commented Jan 3, 2022

Bug Report

$ mypyc --help
Traceback (most recent call last):
  File "/tmp/y/venv/bin/mypyc", line 5, in <module>
    from mypyc.__main__ import main
  File "mypyc/__main__.py", line 18, in <module>
KeyError: '__file__'

To Reproduce

  1. mypyc --help

Expected Behavior

not to crash

(Write what you thought would happen.)

Actual Behavior

see above

(Write what happened.)

Your Environment

  • Mypy version used: 0.930
  • Mypy command-line flags: --help
  • Mypy configuration options from mypy.ini (and other config files): n/a
  • Python version used: 3.8.10
  • Operating system and version: ubuntu 20.04
@asottile asottile added the bug mypy got something wrong label Jan 3, 2022
@A5rocks
Copy link
Contributor

A5rocks commented Jan 3, 2022

This is a known regression: #11700 (comment)

There will be a 0.931 release that solves this sooner or later, I believe.

@hauntsaninja
Copy link
Collaborator

Thanks for the report. This is obviously a pretty bad bug. Fixed on master and tests have been added to the wheel build to catch this kind of thing going forward.

Also linking mypyc/mypyc#912 (comment)

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

No branches or pull requests

3 participants