From: Nick Porter Date: Tue, 17 Sep 2024 16:13:57 +0000 (+0100) Subject: PyEval_ThreadsInitialized was deprecated in 3.9 X-Git-Tag: release_3_2_7~197 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45bdf99856b5fea7ca034f55086242e9136c0d0e;p=thirdparty%2Ffreeradius-server.git PyEval_ThreadsInitialized was deprecated in 3.9 --- diff --git a/src/modules/rlm_python3/rlm_python3.c b/src/modules/rlm_python3/rlm_python3.c index 31a76b5d2de..fed6ec658ab 100644 --- a/src/modules/rlm_python3/rlm_python3.c +++ b/src/modules/rlm_python3/rlm_python3.c @@ -1174,7 +1174,9 @@ static int python_interpreter_init(rlm_python_t *inst, CONF_SECTION *conf) main_interpreter = PyThreadState_Get(); /* Store reference to the main interpreter */ locked = true; } +#if PY_VERSION_HEX < 0x03090000 rad_assert(PyEval_ThreadsInitialized()); +#endif /* * Increment the reference counter