-
Notifications
You must be signed in to change notification settings - Fork 3.9k
GH-47823: [Python] Use PyWeakref_GetRef instead of PyWeakref_GET_OBJECT (Python 3.15) #48027
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
base: main
Are you sure you want to change the base?
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
|
|
|
@github-actions crossbow submit -g python -g wheel |
|
Revision: 563a421 Submitted crossbow builds: ursacomputing/crossbow @ actions-4a1a654c08 |
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.
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, the change from PyWeakref_GET_OBJECT to PyWeakref_GetRef is clear. Thanks for the contribution!
Rationale for this change
pyarrow builds fail on CPython 3.15 due to the 3.15's removal of PyWeakref_GetObject, used in extension_types.cc. This was deprecated in 3.13. A backport is available in the already-vendored pythoncapi_compat.
Fixes #47823. To be clear: this fixes only the build issue reported in the issue, not "3.15 support".
What changes are included in this PR?
Replaces the sole use of PyWeakref_GET_OBJECT with the backported version of PyWeakref_GetRef.
This follows the recommendation from Pending removal in Python 3.15
Are these changes tested?
Build and tested on a local Ubuntu 24.04 build.
Are there any user-facing changes?
No user-facing changes.