-
Notifications
You must be signed in to change notification settings - Fork 184
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
Python 3.12 patch #1158
Python 3.12 patch #1158
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1158 +/- ##
==========================================
- Coverage 87.84% 87.83% -0.02%
==========================================
Files 112 112
Lines 10276 10283 +7
Branches 4032 4034 +2
==========================================
+ Hits 9027 9032 +5
- Misses 698 699 +1
- Partials 551 552 +1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much @Thrameos. Could you please merge latest master to enable testing for Python 3.12?
I think we should add a nightly version of Python to our matrix (if that'd be installable easily) in order to see such upcoming problems earlier. However this could also introduce lots of noise during the development of a new Python minor (which is apprently a major in semantic versioning related to the amount of breaking changes).
Thanks again! This will make a lot of people happy I'd guess 👍 |
Looks like it may be this change which started a Python 3.7 nightly test to fail. Example in https://gitlab.cern.ch/scripting-tools/pyjapc/-/jobs/34505253. I'm pinned back right now, but can investigate later next week if needed. |
Okay I can roll that back. I will have to investigate which systems have mallinfo vs mallinfo2.
|
This should fix Python 3.12 though not without serious wrinkles. The new PyLong mutates a field in such a way that it will break anything that wants to add memory to the tail of the object to save a few bytes. I though that given that we were following the exact mechanism that Python requires for its own structures that we would be safe. The mutation is entirely in private parts of Python so I can't just use the private symbols so we track with any changes. It doesn't just break our code but also the dictoffset and weakoffset fields in the Python base class, so I can't see that it will remain in the current state. Thus this is at best a version that will work until the repair to the memory model is done, and then we likely have to rework another time.
Changes include: