-
Notifications
You must be signed in to change notification settings - Fork 181
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
Remove use of tp_new #1217
Remove use of tp_new #1217
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1217 +/- ##
==========================================
- Coverage 87.21% 87.18% -0.03%
==========================================
Files 113 113
Lines 10277 10281 +4
Branches 4088 4075 -13
==========================================
+ Hits 8963 8964 +1
- Misses 718 722 +4
+ Partials 596 595 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@marscher I think that this one should solve the issues on Python 3.14 with deprecated The following was done in the PR.
If we ever need to add precheck logic on the class (such as allowing classes to be overwritten in Python, then we will need to implement a |
Will do…. Not sure how it came into existence.
|
@marscher October is soon upon us and I will need to make our yearly maintence release. Please tag/approve PRs so I can start the release process. |
@Thrameos do you want to include this for the next release? After reading your comments I got the impression that it is not yet stable - am I wrong? |
The instability appeared to be been tied directly to Python 3.13 and the different attempts to fix the allocator problem. The first was "stable" but extremely dangerous as it was altering active types. The second used approved but unstable methods, but failed because those methods don't work. The third was built on a variation of the Python 3.12 hack which created a dummy type purely to be manipulated. That option proved to be the most stable of the options. Using that as a foundation the tp_new deprecation fix appears completely stable. So I believe it ready to be applied. |
This is a placeholder for removing the deprecated tp_new to comply with Python 3.14. This PR won't work yet for a few reasons.
I am debating whether I can just override the
tp_call
method and add our type checks at that point rather than tp_new.