Skip to content

Add helpful message to assert in mypyc #12119

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

Merged
merged 1 commit into from
Feb 4, 2022

Conversation

thejcannon
Copy link
Contributor

Description

I've been running mypyc on a codebase and hitting frequent AssertionError with no helpful message. This change simply adds a helpful error message so the next fool who runs into this doesn't have to poke through mypyc code to find out the problem.

Test Plan

N/A (Should a test be added? I didn't see any failure tests for irbuild 🤔 )

@thejcannon thejcannon changed the title Add helpful message to assert Add helpful message to assert in mypyc Feb 3, 2022
@JelleZijlstra
Copy link
Member

Seems reasonable, but really we shouldn't be hitting this assertion at all. Could you report a bug with an example that fails this assertion?

@thejcannon
Copy link
Contributor Author

Done #12120

@hauntsaninja hauntsaninja merged commit 04cac4b into python:master Feb 4, 2022
@hauntsaninja
Copy link
Collaborator

Thanks, this seems useful till this is properly supported!

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

Successfully merging this pull request may close these issues.

3 participants