Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package swig for openSUSE:Factory checked in at 2022-10-15 16:34:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/swig (Old) and /work/SRC/openSUSE:Factory/.swig.new.2275 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "swig" Sat Oct 15 16:34:58 2022 rev:78 rq:1010916 version:4.0.2 Changes: -------- --- /work/SRC/openSUSE:Factory/swig/swig.changes 2022-09-27 20:13:07.941721376 +0200 +++ /work/SRC/openSUSE:Factory/.swig.new.2275/swig.changes 2022-10-15 16:36:14.949979200 +0200 @@ -1,0 +2,9 @@ +Thu Oct 13 17:47:25 UTC 2022 - Michal Suchanek <[email protected]> + +- Fix SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats + with python 3.10 gh#swig/swig#2277 + + swig-Python-define-PY_SSIZE_T_CLEAN.patch + + swig-Define-PY_SSIZE_T_CLEAN-macro.patch + + swig-Define-PY_SSIZE_T_CLEAN-only-when-not-defined-yet.patch + +------------------------------------------------------------------- New: ---- swig-Define-PY_SSIZE_T_CLEAN-macro.patch swig-Define-PY_SSIZE_T_CLEAN-only-when-not-defined-yet.patch swig-Python-define-PY_SSIZE_T_CLEAN.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ swig.spec ++++++ --- /var/tmp/diff_new_pack.DMHxIF/_old 2022-10-15 16:36:16.585983131 +0200 +++ /var/tmp/diff_new_pack.DMHxIF/_new 2022-10-15 16:36:16.589983141 +0200 @@ -47,6 +47,12 @@ # PATCH-FIX-UPSTREAM 15515f390c5e3316a7faf0cf85d661a297d45a50.patch - gh#swig/swig#2138, remove obsolete pcre1 # from https://github.com/swig/swig/commit/15515f390c5e3316a7faf0cf85d661a297d45a50.patch Patch3: 15515f390c5e3316a7faf0cf85d661a297d45a50.patch +# PATCH-FIX-UPSTREAM https://github.com/swig/swig/pull/2277 +Patch4: swig-Python-define-PY_SSIZE_T_CLEAN.patch +# PATCH-FIX-UPSTREAM https://github.com/swig/swig/pull/2277 +Patch5: swig-Define-PY_SSIZE_T_CLEAN-macro.patch +# PATCH-FIX-UPSTREAM https://github.com/swig/swig/pull/2401 +Patch6: swig-Define-PY_SSIZE_T_CLEAN-only-when-not-defined-yet.patch Patch308: swig308-isfinite.diff BuildRequires: autoconf ++++++ swig-Define-PY_SSIZE_T_CLEAN-macro.patch ++++++ >From abc8e0bb277f7a54ff4ee209845dde910d267819 Mon Sep 17 00:00:00 2001 From: William S Fulton <[email protected]> Date: Fri, 27 May 2022 18:58:04 +0100 Subject: [PATCH] Define PY_SSIZE_T_CLEAN macro before #include "Python.h" as recommended in Python 3.7 and later. Issue #2277 --- CHANGES.current | 11 +++++++++++ Lib/python/embed.i | 2 +- Lib/python/pyruntime.swg | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) Index: swig-4.0.2/CHANGES.current =================================================================== --- swig-4.0.2.orig/CHANGES.current +++ swig-4.0.2/CHANGES.current @@ -7,6 +7,17 @@ the issue number to the end of the URL: Version 4.0.2 (8 Jun 2020) ========================== +2022-05-27: xypron + [Python] #2277 Define PY_SSIZE_T_CLEAN macro before #include "Python.h" as + recommended in Python 3.7 and later. + + To avoid this macro definition, add the following to your interface file so + that SWIG_NO_PY_SSIZE_T_CLEAN is defined at the beginning of the C++ wrappers: + + %begin %{ + #define SWIG_NO_PY_SSIZE_T_CLEAN + %} + 2020-06-07 vigsterkr [Ruby] #1717 Nil fix mangling strings Index: swig-4.0.2/Lib/python/embed.i =================================================================== --- swig-4.0.2.orig/Lib/python/embed.i +++ swig-4.0.2/Lib/python/embed.i @@ -29,7 +29,7 @@ As far as I know, this module is C++ saf #endif %wrapper %{ -#ifndef PY_SSIZE_T_CLEAN +#ifndef SWIG_NO_PY_SSIZE_T_CLEAN #define PY_SSIZE_T_CLEAN #endif #include <Python.h> Index: swig-4.0.2/Lib/python/pyruntime.swg =================================================================== --- swig-4.0.2.orig/Lib/python/pyruntime.swg +++ swig-4.0.2/Lib/python/pyruntime.swg @@ -4,7 +4,7 @@ # include <math.h> #endif -#ifndef PY_SSIZE_T_CLEAN +#ifndef SWIG_NO_PY_SSIZE_T_CLEAN #define PY_SSIZE_T_CLEAN #endif #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG) ++++++ swig-Define-PY_SSIZE_T_CLEAN-only-when-not-defined-yet.patch ++++++ >From c3f17b415dc63906218306135da49bf1f941588f Mon Sep 17 00:00:00 2001 From: Michal Suchanek <[email protected]> Date: Thu, 13 Oct 2022 23:25:52 +0200 Subject: [PATCH] Define PY_SSIZE_T_CLEAN only when not defined yet Users of swig 4.0.2 and python 3.10 will likely define the PY_SSIZE_T_CLEAN macro by hand when relevant because their bindings won't build otherwise. Unconditionally defining PY_SSIZE_T_CLEAN in swig 4.10 will lead to macro redefinition warning. Signed-off-by: Michal Suchanek <[email protected]> --- Lib/python/embed.i | 2 +- Lib/python/pyruntime.swg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Index: swig-4.0.2/Lib/python/embed.i =================================================================== --- swig-4.0.2.orig/Lib/python/embed.i +++ swig-4.0.2/Lib/python/embed.i @@ -29,7 +29,7 @@ As far as I know, this module is C++ saf #endif %wrapper %{ -#ifndef SWIG_NO_PY_SSIZE_T_CLEAN +#if !defined(PY_SSIZE_T_CLEAN) && !defined(SWIG_NO_PY_SSIZE_T_CLEAN) #define PY_SSIZE_T_CLEAN #endif #include <Python.h> Index: swig-4.0.2/Lib/python/pyruntime.swg =================================================================== --- swig-4.0.2.orig/Lib/python/pyruntime.swg +++ swig-4.0.2/Lib/python/pyruntime.swg @@ -4,7 +4,7 @@ # include <math.h> #endif -#ifndef SWIG_NO_PY_SSIZE_T_CLEAN +#if !defined(PY_SSIZE_T_CLEAN) && !defined(SWIG_NO_PY_SSIZE_T_CLEAN) #define PY_SSIZE_T_CLEAN #endif #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG) ++++++ swig-Python-define-PY_SSIZE_T_CLEAN.patch ++++++ >From ca6a73277b7f48ce4cf9d30d7bff7813f3685684 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt <[email protected]> Date: Mon, 9 May 2022 19:53:20 +0200 Subject: [PATCH] Python: define PY_SSIZE_T_CLEAN It is recommended to always define PY_SSIZE_T_CLEAN before including Python.h. Cf. https://docs.python.org/3/c-api/intro.html This avoids errors like: SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats Signed-off-by: Heinrich Schuchardt <[email protected]> --- Lib/python/embed.i | 4 +++- Lib/python/pyruntime.swg | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) Index: swig-4.0.2/Lib/python/embed.i =================================================================== --- swig-4.0.2.orig/Lib/python/embed.i +++ swig-4.0.2/Lib/python/embed.i @@ -29,7 +29,9 @@ As far as I know, this module is C++ saf #endif %wrapper %{ - +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif #include <Python.h> #ifdef __cplusplus Index: swig-4.0.2/Lib/python/pyruntime.swg =================================================================== --- swig-4.0.2.orig/Lib/python/pyruntime.swg +++ swig-4.0.2/Lib/python/pyruntime.swg @@ -4,6 +4,9 @@ # include <math.h> #endif +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG) /* Use debug wrappers with the Python release dll */ # undef _DEBUG
