-
-
Notifications
You must be signed in to change notification settings - Fork 443
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
Fix compilation errors on latest 3.11.0 #1368
Conversation
The coverage failures look like in the case of a yield, we are confused about the frames, and record a filename/lineno pair using our lineno and the caller's filename, or something like that. |
@vstinner @markshannon, if you have any ideas :) |
What's your question?
Which failures? |
I didn't post the test failures because they can be hard to interpret, but here they are:
Search there in particular for 636:
There is definitely not a line 636 in the code under test, which makes me think about frame-level confusion. |
@markshannon: some more information. I defined WHAT_LOG in coverage.py's C code, to log the events seen by the trace function. For the test_async code shown above, I see this with the tip of CPython (just a few lines from the middle of a long output):
The same part of the output when running under 3.10 is:
3.11 seems to be sending two consecutive LINE events (marked with stars), but in different frames. |
It looks like there is an extra LINE event before the CALL event. I've opened python/cpython#92236 |
Is there anything special about the code in |
It's just the code from the test, as a separate file:
|
Thanks. |
@markshannon: for the generator tests, it seems like there's a change in the initial events: Tip of main shows:
while 3.10 shows:
The starred lines are different. gen.py is:
|
I'm struggling to reproduce this.
|
Yes, Python trace functions get the same sequence of events on 3.10 and 3.11. My C trace function does not. |
Hello, I've tried this patch and I can confirm that it works. It fixed about 50 Python packages that were previously broken by coverage. Thank you! |
bac830c
to
ba00c82
Compare
25a314c
to
5211178
Compare
5211178
to
fc40c6d
Compare
fc40c6d
to
e5b91eb
Compare
This is merged into master. |
Another attempt at 3.11.0-latest compatibility. This fully compiles, but gets wrong answers for generators.