freeradius-server icon indicating copy to clipboard operation
freeradius-server copied to clipboard

Fix build errors with Python 3.13

Open antoniotorresm opened this issue 2 years ago • 1 comments
trafficstars

According to 1, the PyEval_InitThreads() (deprecated 3.9), PyEval_AcquireLock() and PyEval_ReleaseLock() (deprecated 3.2). functions, are removed in Python 3.13. Py_SetProgramName() is deprecated since 3.11 as well.

PyEval_InitThreads can be deleted if running Python >= 3.10 as it simply does nothing from Python 3.9 2.

Lock functions are replaced with PyEval_RestoreThread and PyEval_SaveThread as advised by Python docs 3, 4.

As for Py_SetProgramName, it should be replaced with PyConfig. The config is isolated to replicate behavior of InitializeEx 5.

antoniotorresm avatar Oct 24 '23 11:10 antoniotorresm

I've done some formatting and cleanups. Please double-check.

alandekok avatar Jan 18 '24 15:01 alandekok