folly icon indicating copy to clipboard operation
folly copied to clipboard

Build failure with Python 3.13

Open bendk opened this issue 1 year ago • 9 comments

The Python code uses _Py_IsFinalizing, but that's been renamed to Py_IsFinalizing in Python 3.13. Here's an Apache Arrow issue and PR that explains the problem and how to fix it.

bendk avatar Dec 28 '24 17:12 bendk

@bendk can i take this issue ?

Ko496-glitch avatar Jan 08 '25 00:01 Ko496-glitch

Sure, please do.

bendk avatar Jan 08 '25 01:01 bendk

@bendk Correct if i am wrong but from what i understand when the PR was created and looking up the background info i am given to understand that i should take these steps to track the issue.

  1. Check the version gated #define for Py_IsFinalizing.
  2. Check if the pythoncapi-compat is breaking anything for transition _Py_isFinalizing -> Py_IsFinalizing If you can provide more info on this it would be really helpful Thanks

Ko496-glitch avatar Jan 08 '25 05:01 Ko496-glitch

I think you can do the same steps as the PR:

  • Change _Py_isFinalizing to Py_IsFinalizing
  • Add a #define with a version check that defines Py_IsFinalizing for older python versions.

bendk avatar Jan 08 '25 13:01 bendk

Oka i will start from header files.

Ko496-glitch avatar Jan 08 '25 14:01 Ko496-glitch

opening a PR

Ko496-glitch avatar Jan 08 '25 15:01 Ko496-glitch

@bendk PR submitted please let me know if there are any other changes too i have to make. Thanks!

Ko496-glitch avatar Jan 09 '25 04:01 Ko496-glitch

Great! It looks good to me, but I'm just a user of the library. I don't have the power to approve the PR. Hopefully someone from facebook will.

bendk avatar Jan 09 '25 13:01 bendk

Also just ran into this issue (while building on Arch Linux). Would appreciate this being fixed.

Leont avatar Jan 27 '25 16:01 Leont