From 8b25832ba086c6e18627c5fc04e3f09b71970f11 Mon Sep 17 00:00:00 2001 From: Richard Cohen Date: Wed, 29 Mar 2023 11:21:10 +0100 Subject: [PATCH] PySys_SetArgv is deprecated in 3.11 The initialization API was updated in 3.8. "This API is kept for backward compatibility: setting PyConfig.argv and PyConfig.parse_argv should be used instead, see Python Initialization Configuration." --- gnucash/python/gncmod-python.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gnucash/python/gncmod-python.c b/gnucash/python/gncmod-python.c index 9b92ec48f7..d2bd8a5183 100644 --- a/gnucash/python/gncmod-python.c +++ b/gnucash/python/gncmod-python.c @@ -57,6 +57,11 @@ libgncmod_python_gnc_module_description(void) return g_strdup("An embedded Python interpreter"); } +#if PY_VERSION_HEX >= 0x030b0000 +// PySys_SetArgv is deprecated in 3.11 +#pragma GCC diagnostic warning "-Wdeprecated-declarations" +#endif + int libgncmod_python_gnc_module_init(int refcount) {