Skip to content

Conversation

@2elli
Copy link
Collaborator

@2elli 2elli commented Dec 12, 2024

Fixes

  • Python 3.10 Code310.co_lines() was not parsing co_linetable correctly. Changed to using struct to iterate over the unsigned and signed bytes in the co_linetable, also re-implemented some of the byte parsing logic following cpython source.
  • Python 3.11-3.13 opcode_310.py had incorrect ordering of assigning opcode_arg_fmt, leading to opcodes not being formatted correctly
    • This fixed many other things as well, like FORMAT_VALUE not having a correct argrepr.

Other Changes

  • Removed xdis/codetype/code312.py as it was no longer needed. The code that was in there we found also applied to 3.11 so it was previously moved there.

To-do

Locally wrote some good cross-version tests; plan on using some of those ideas / code when I have the chance to work on improving xdis tests.

@rocky
Copy link
Owner

rocky commented Dec 15, 2024

Thanks for all of the good work.

@rocky rocky merged commit 0af394a into rocky:master Dec 15, 2024
6 checks passed
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