KEMBAR78
Fix `gen_is_coroutine` for Python 3.13 by cdce8p · Pull Request #17501 · python/mypy · GitHub
Skip to content

Conversation

cdce8p
Copy link
Collaborator

@cdce8p cdce8p commented Jul 7, 2024

The _PyInterpreterFrame struct was changed in python/cpython#105727 to store the code object in f_executable instead of f_code.

Fixes

  /home/runner/work/mypy/mypy/mypyc/lib-rt/pythonsupport.h: In function ‘_PyGen_GetCode’: (diff)
  /home/runner/work/mypy/mypy/mypyc/lib-rt/pythonsupport.h:403:17: error: ‘_PyInterpreterFrame’ has no member named ‘f_code’ (diff)
    403 |     return frame->f_code; (diff)
        |                 ^~ (diff)

@cdce8p cdce8p force-pushed the fix-3.13-interpreter-frame branch from 21087bb to 05c1f14 Compare July 7, 2024 13:06
@cdce8p cdce8p added the topic-mypyc mypyc bugs label Jul 7, 2024
Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't quite follow the point of the CPython changes, is this field actually used for non-code objects now?

@hauntsaninja hauntsaninja merged commit d4f7e5c into python:master Jul 7, 2024
@cdce8p cdce8p deleted the fix-3.13-interpreter-frame branch July 7, 2024 20:15
@cdce8p
Copy link
Collaborator Author

cdce8p commented Jul 7, 2024

I didn't quite follow the point of the CPython changes, is this field actually used for non-code objects now?

I believe the idea is to reuse this field for non-code objects / not needing to create fake code object to be able to use it.
Likely doesn't matter for us, at least not at this point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic-mypyc mypyc bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants