-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
GH-41475: [Python] Build with Python 3.13 #42034
Conversation
|
Instead of doing such adjustements one by one, how about we vendor a version of https://github.com/python/pythoncapi-compat ? cc @jorisvandenbossche |
The private function `_Py_IsFinalizing` renamed to `Py_IsFinalizing` in Python 3.13.0a1
Co-authored-by: Sutou Kouhei <[email protected]>
I am not very familiar with it to estimate how much we would make use of it (this PR also essentially only adds 3 lines, and the actual changes to change I quickly tested its upgrade script on the pyarrow C++ code, and what it does change is replace a bunch of But maybe the more interesting usage of the tool would be that we can use newer C API functions in our code that might make our PyArrow C++ easier to read or maintain? (but again not sure how much of those cases would actually apply here) |
(I am also fine with considering https://github.com/python/pythoncapi-compat for a follow-up issue, and at least ensure now pyarrow builds with Python 3.13) |
Co-authored-by: Joris Van den Bossche <[email protected]>
Yes, the idea would be to use newer C API functions as in this PR. Vendoring it should be trivial: there is a single |
I don't have time this or coming week to look into vendoring pythoncapi-compat, ad given the upcoming feature freeze for 17.0 the week after, I would suggest we merge this for now and track using pythoncapi-compat as a follow-up issue. |
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.
+1
@github-actions crossbow submit -g python |
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.
I am running extra CI for this. If tests are successful I'll merge as is and we can open a follow up issue to vendor pythoncapi-compat as suggested
Revision: 79c37cd Submitted crossbow builds: ursacomputing/crossbow @ actions-d83aa38dd0 |
Failures are unrelated |
I've created the follow up issue #43069 to vendor https://github.com/python/pythoncapi-compat |
After merging your PR, Conbench analyzed the 7 benchmarking runs that have been run so far on merge-commit 1ce69ec. There were 12 benchmark results with an error:
There was 1 benchmark result indicating a performance regression:
The full Conbench report has more details. It also includes information about 3 possible false positives for unstable benchmarks that are known to sometimes produce them. |
### Rationale for this change The private function `_Py_IsFinalizing` renamed to `Py_IsFinalizing` in Python 3.13.0a1. Without this change pyarrow will not compile with this version of Python or higher. ### What changes are included in this PR? add a version-gated `#define` to handle the change. ### Are these changes tested? Local build succeeds. ### Are there any user-facing changes? no * GitHub Issue: apache#41475 Lead-authored-by: Thomas A Caswell <[email protected]> Co-authored-by: Joris Van den Bossche <[email protected]> Co-authored-by: Sutou Kouhei <[email protected]> Signed-off-by: Raúl Cumplido <[email protected]>
### Rationale for this change #43540 already vendored `pythoncapi_compat.h`, so closing #43069 by using this as well for `Py_IsFinalizing` (which was added in #42034, and for which we opened that follow-up issue to use `pythoncapi_compat.h` instead) Authored-by: Joris Van den Bossche <[email protected]> Signed-off-by: Joris Van den Bossche <[email protected]>
Rationale for this change
The private function
_Py_IsFinalizing
renamed toPy_IsFinalizing
in Python 3.13.0a1. Without this change pyarrow will not compile with this version of Python or higher.What changes are included in this PR?
add a version-gated
#define
to handle the change.Are these changes tested?
Local build succeeds.
Are there any user-facing changes?
no