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 compatibility with Python 3.13 #664

Merged
merged 4 commits into from
Oct 18, 2024
Merged

Fix compatibility with Python 3.13 #664

merged 4 commits into from
Oct 18, 2024

Conversation

inducer
Copy link
Owner

@inducer inducer commented Oct 15, 2024

This fixes a few issues I've noticed with Python 3.13, which seems to contain quite a few changes to bdb. This seems to work for me, but I'm not necessarily confident in these changes. See the commit messages for some explanation.

I would love some testing from others before I release this.

@asmeurer @mvanderkamp Would you be willing to give this a look/test?

@inducer inducer force-pushed the py3.13 branch 2 times, most recently from b6a9014 to 1f8c7ca Compare October 15, 2024 04:05
These were copy-pasted in from CPython in
6065d5a
According to https://bugs.python.org/issue16482, where the patch
originated, all supported versions of Python now have the fix.
Additionally, Python 3.13 has further modifications, which we
probably shouldn't copy.
This code dates from the very early days of Pudb, possibly copy-pasted
from early pdb. No recent Python seems to have it, and on Py3.13 it
is actively harmful, because its new frame locals proxy prohibits
deletion of frame locals.
This makes the code a bit easier to follow, and it uses a more
appropriate _set_stopinfo in the pause case, instead of set_step.
Use of set_step was causing set_trace to stop somewhere in the
guts of bdb.

Closes gh-663
@inducer
Copy link
Owner Author

inducer commented Oct 18, 2024

Ah well, it's probably better to have this than not. I'll merge and roll a release.

@inducer inducer merged commit 2838f12 into main Oct 18, 2024
9 checks passed
@inducer inducer deleted the py3.13 branch October 18, 2024 16:35
@asmeurer
Copy link
Collaborator

The code here seems to be related to the work I did on unbreakpointing a set_trace line. I tested it in 3.9, 3.12, and 3.13 and it still seems to work.

@inducer
Copy link
Owner Author

inducer commented Oct 18, 2024

Thanks for taking a look!

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