-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
3.13 source support (removes deprecated functions) #2994
Conversation
Vendoring that header in is definitely a step in the right direction |
I'm just annoyed the deprecation cycle is so sharp that I feel forced to use it. |
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.
LGTM, thanks! 👍
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.
LGTM! I don't like having to vendor in that header, but I agree it's our best option for now. I do have concerns about maintaining it because we have to re-vendor it every time python gets a minor revision update (and maybe in rare cases where a patch update might break something?). On top of us having to remember to re-vendor it, there's the always-present concern of us supported python revs longer than python itself, so we may still end up having to do our own shimming from time to time if they remove something from the compat header that we still need to support. But, yeah, for now I think this is the best we're gonna get
Well to get new functions from new versions we would need to update this, but new versions won't break old functions.
Looking in the header it seems to still support Python 2, so I'm not concerned about that. |
This gets 3.13 building on my system with no warnings, which is an important prereq to getting 3.13 on CI.
It seems like 3.13 on CI should wait for #2945.
Weakref changes: https://docs.python.org/3.13/c-api/weakref.html#c.PyWeakref_GetObject . You can read about in the 3.13 whatsnew.
These changes are really annoying for us, the old behavior was fine for our uses, we could handle the Nones coming out, now we have to deal with 3 separate states (there was no error report state before). The old code was ancient but worked fine. The old function is in the stable ABI, and the new function is new in the release! They are not giving us much of a window here.
So, I had to bring in the python c api compat header to deal with this, the patch would be even more complex if I was trying to make this work on python versions without the new function too. I figure it will be nice for us to have this header around for other features, so we can write our C API code like we only target the latest version.