Uh oh!
There was an error while loading. Please reload this page.
GH-41475: [Python] Build with Python 3.13 - #42034
Conversation
Uh oh!
There was an error while loading. Please reload this page.
pitrou
commented
Jun 10, 2024
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 <kou@cozmixng.org>
jorisvandenbossche
commented
Jun 11, 2024
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) |
Uh oh!
There was an error while loading. Please reload this page.
jorisvandenbossche
commented
Jun 11, 2024
(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 <jorisvandenbossche@gmail.com>
pitrou
commented
Jun 11, 2024
Yes, the idea would be to use newer C API functions as in this PR. Vendoring it should be trivial: there is a single |
jorisvandenbossche
commented
Jun 20, 2024
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. |
raulcd
commented
Jun 26, 2024
@github-actions crossbow submit -g python |
raulcd
left a comment
There was a problem hiding this comment.
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 |
raulcd
commented
Jun 26, 2024
Failures are unrelated |
raulcd
commented
Jun 26, 2024
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 #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 <jorisvandenbossche@gmail.com> Signed-off-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
### Rationale for this change apache/arrow#43540 already vendored `pythoncapi_compat.h`, so closing apache/arrow#43069 by using this as well for `Py_IsFinalizing` (which was added in apache/arrow#42034, and for which we opened that follow-up issue to use `pythoncapi_compat.h` instead) Authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com> Signed-off-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
Rationale for this change
The private function
_Py_IsFinalizingrenamed toPy_IsFinalizingin 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
#defineto handle the change.Are these changes tested?
Local build succeeds.
Are there any user-facing changes?
no