Skip to content
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 line numbers for Python 3.10 #6

Merged
merged 1 commit into from
Feb 9, 2024

Conversation

radoering
Copy link
Contributor

When executing the unit tests, I noticed that the Fibonacci test failed with Python 3.10 because of wrong line numbers. It seems this is caused by PEP 626, which introduces a new attribute co_linetable. The old co_lnotab is only created lazily and might be empty in the dump. I made some changes to fix line numbers for Python 3.10.

Tests are now passing with Python 3.9 and Python 3.10 on my machine.

@SeanCline SeanCline merged commit 2b90637 into SeanCline:master Feb 9, 2024
@SeanCline
Copy link
Owner

Thanks for your contribution!

This is actually a good step toward Python 3.11/3.12 support for #5 .

How we handle frames still needs a significant change in 3.11+, using _PyInterpreterFrame to reconstruct the callstack rather than relying on the existence of a PyFrameObject.

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.

2 participants