Skip to content
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

Fix: Replace _Py_IsFinalizing with Py_IsFinalizing for Python 3.13 compatibility and added version hex #2360

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion folly/python/AsyncioExecutor.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
#include <folly/executors/SequencedExecutor.h>
#include <folly/io/async/NotificationQueue.h>


#if PY_VERSION_HEX < 0x030d0000 // Check if the python version is less than 3.13
#define Py_IsFinalizing _Py_IsFinalizing
#endif

namespace folly {
namespace python {

Expand Down Expand Up @@ -79,7 +84,7 @@ class AsyncioExecutor : public DrivableExecutor {
#if PY_VERSION_HEX <= 0x03070000
return false;
#else
return _Py_IsFinalizing();
return Py_IsFinalizing(); // change _PY_IsFinalizing to Py_IsFinalizing
#endif
}

Expand Down
Loading