gnudatalanguage / gdl

GDL - GNU Data Language
GNU General Public License v2.0
274 stars 61 forks source link

Use new python initialisation, if old one is deprecated #1793

Closed jkohnert closed 4 months ago

jkohnert commented 5 months ago

See issue, and PEP 587.

Since Python version 3.11 the old legacy initialisation functions are marked deprecated, the upgrade path is specified in the PEP. GDL uses those deprecated functions in two locations, this PR updates those locations to use the new API in case Python version is 3.11 or above.

jkohnert commented 5 months ago

I just had another look: The Windows build uses Python-3.12 at the moment, this patch successfully removes the deprecation warnings for using PySys_SetArgv during this build. On Arch Linux (I'm using it on my dev machine) those warnings are removed as well.