Skip to content

Updating Pythonic to use Python Stable ABI.

Updating Pythonic to use Python Stable ABI.

This is the best means to support multiple Python versions without any conflicts because Python keeps the Stable ABI backward compatible. More details can be found at https://docs.python.org/3/c-api/stable.html#stable.


Using PySys_SetArgvEx raises a deprecation warning when compiling with Python 3.11. But this should not be a problem, as PySys_SetArgvEx is part of the Stable ABI.

Docs on PySys_SetArgvEx can be found at https://docs.python.org/3/c-api/init.html#c.PySys_SetArgvEx.

oct-py-init.cc: In function ‘void pythonic::py_init()’:
oct-py-init.cc:51:40: warning: ‘void PySys_SetArgvEx(int, wchar_t**, int)’ is deprecated [-Wdeprecated-declarations]
   51 |         PySys_SetArgvEx (1, sys_argv, 1);
      |                                        ^
In file included from /home/vipul/.pyenv/versions/3.11.4/include/python3.11/Python.h:96,
                 from oct-py-init.cc:33:
/home/vipul/.pyenv/versions/3.11.4/include/python3.11/sysmodule.h:14:38: note: declared here
   14 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) PySys_SetArgvEx(int, wchar_t **, int);
      |                                      ^~~~~~~~~~~~~~~

Merge request reports

Loading