-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Yet another "AssertionError: Should never get here in normal mode" #5631
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
Comments
Doing |
I still see the crash on master. I am investigating now. |
OK, it looks like the code causing the crash is also similar to the previous one (now in try: # Python 3:
# Not a no-op, we're adding this to the namespace so it can be imported.
ConnectionError = ConnectionError
except NameError: # Python 2:
class ConnectionError(Exception):
pass I will try to write a simple repro now. |
OK, the minimal repro is as simple as this:
Also it looks like this is a regression since 0.620, caused by #5565 The fix is straightforward, the only question is does this warrant a bug-fix release 0.631? |
Let's wait first if there are other reports of this issue. If not, we can release 0.640 in ~two weeks, on a slightly accelerated schedule. If there are other reports, a bug-fix release may make sense. |
Fixes #5631 Unfortunately one still needs to use `# type: ignores`, mypy has troubles understanding complex conditional definitions like in the issue: ```python try: ConnectionError = ConnectionError except NameError: class ConnectionError(Exception): pass ``` But this is a separate problem, that is harder to solve.
Thanks for this fix! ^.^ (late post) |
Similar crash as in #5192; happening with current pip master.
I haven't tested with master (internet access is patchy for me atm) but this does occur for mypy 0.630 on Python 3.7.0.
The text was updated successfully, but these errors were encountered: