-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
"Consistent AST position" crashes pytest: "ValueError: line 22-0 is not a valid range" #93387
Comments
@pablogsal ^^ |
Cross-reference #92597 |
BTW, latest tip of CPython (07df8d5) also fails in this way. |
This is expected, and it means that something is creating and compiling AST nodes with invalid position information. In this case the end line number is lower than the start line number. This can crash the compiler so we reject it now. |
Unfortunately seems that #93359 didn't make it to beta2 so you likely need that fix so AST nodes created with line number but no end line number still work as before. |
I'm closing this as this is a duplicate of #92597 |
Bug report
The coverage.py test suite fails to even start on 3.11.0b2, because of a crash inside pytest related to code positions. This is the error from a nightly build:
When I run the test suite locally with 3.11.0b2, I get the same traceback, but the message is "line 1-0 is not a valid range".
Running pytest directly, rather than through my helper doesn't fail.
I git bisected: the first bad commit was:
Your environment
To reproduce
The text was updated successfully, but these errors were encountered: