-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
ctypes_patch breaks with Python 3.13.0a6 #444
Comments
Ah, my awful hack finally broke! I'm surprised it didn't happen sooner... The relevant CPython commit appears to be python/cpython@dcaf33a, which removes the Thankfully, the fields we care about are still structured almost identically as before - only the location where they are stored has changed. So as long as we can figure out the new location of the data, it should be easy to adjust the patch to work with both the old and new ways. The way to access the new attached data is using the That said, this would also be a good opportunity to upstream our patch into CPython itself, so it would be properly supported and maintained. Then we could stop doing our risky runtime patching... There is already an open CPython issue for this since 2009 (python/cpython#49960, formerly known as bpo-5710), so clearly others are interested in this too. I don't remember why we didn't try upstreaming this patch earlier - though most likely there is no particular reason and just nobody had the time for it. |
I took a quick poke after I logged this bug, and came to about the same conclusion as you have. The upstream bug has been on my "I really should do something about that" list for a while. I agree that this would be an ideal opportunity to fix this bug upstream - finally removing this compatibility shim would be awesome. |
Describe the bug
As of Python3.13.0a6, the ctypes patch used to allow struct return values no longer works.
Steps to reproduce
Run the test suite on Python 3.13.0a6.
There will be 7 test failures, all of the form:
Expected behavior
Test suite should pass.
Screenshots
No response
Environment
Logs
No response
Additional context
Test suite passes with 3.13.0a5.
The text was updated successfully, but these errors were encountered: