Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-cffi for openSUSE:Factory checked in at 2026-03-17 19:02:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-cffi (Old) and /work/SRC/openSUSE:Factory/.python-cffi.new.8177 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-cffi" Tue Mar 17 19:02:17 2026 rev:48 rq:1339194 version:2.0.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-cffi/python-cffi.changes 2025-09-15 19:54:31.763194070 +0200 +++ /work/SRC/openSUSE:Factory/.python-cffi.new.8177/python-cffi.changes 2026-03-17 19:02:27.175592408 +0100 @@ -1,0 +2,6 @@ +Mon Mar 16 01:39:36 UTC 2026 - Steve Kowalik <[email protected]> + +- Add patch support-pycparser-3.patch: + * Support pycparser 3 exception message changes. + +------------------------------------------------------------------- New: ---- support-pycparser-3.patch ----------(New B)---------- New: - Add patch support-pycparser-3.patch: * Support pycparser 3 exception message changes. ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-cffi.spec ++++++ --- /var/tmp/diff_new_pack.c0N4Rm/_old 2026-03-17 19:02:27.799617998 +0100 +++ /var/tmp/diff_new_pack.c0N4Rm/_new 2026-03-17 19:02:27.799617998 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-cffi # -# Copyright (c) 2025 SUSE LLC and contributors +# Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,6 +25,8 @@ URL: https://cffi.readthedocs.org Source0: https://files.pythonhosted.org/packages/source/c/cffi/cffi-%{version}.tar.gz Source1: python-cffi-rpmlintrc +# PATCH-FIX-UPSTREAM gh#python-cffi/cffi#224 +Patch0: support-pycparser-3.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module pip} BuildRequires: %{python_module pycparser} @@ -61,5 +63,5 @@ %doc README.md doc/source/*.rst doc/misc/*.rst %{python_sitearch}/cffi %{python_sitearch}/_cffi_backend.*.so -%{python_sitearch}/cffi-%{version}*-info +%{python_sitearch}/cffi-%{version}.dist-info ++++++ support-pycparser-3.patch ++++++ >From 615c2a47375bfebc388652691d7641ad610e183f Mon Sep 17 00:00:00 2001 From: Eli Bendersky <[email protected]> Date: Sat, 24 Jan 2026 08:42:49 -0800 Subject: [PATCH 1/2] Make test_parsing more resilient to changes in pycparser Several tests expect precise error messages from pycparser, which pycparser doesn't guarantee. While testing CFFI with pycparser 3.0, some tests needed to be made more resilient. I've used the .startswith() approach already used in this file, instead of exact string matching. Ref #223 --- testing/cffi0/test_parsing.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/testing/cffi0/test_parsing.py b/testing/cffi0/test_parsing.py index 8d4dd016..d0f466bd 100644 --- a/testing/cffi0/test_parsing.py +++ b/testing/cffi0/test_parsing.py @@ -197,7 +197,7 @@ def test_dont_remove_comment_in_line_directives(): some syntax error here """) - assert str(e.value) == "parse error\nbaz.c:9:14: before: syntax" + assert str(e.value).startswith("parse error\nbaz.c:9:") # e = pytest.raises(CDefError, ffi.cdef, """ #line 7 "foo//bar.c" @@ -205,21 +205,21 @@ def test_dont_remove_comment_in_line_directives(): some syntax error here """) # - assert str(e.value) == "parse error\nfoo//bar.c:8:14: before: syntax" + assert str(e.value).startswith("parse error\nfoo//bar.c:8:") ffi = FFI(backend=FakeBackend()) e = pytest.raises(CDefError, ffi.cdef, """ \t # \t 8 \t "baz.c" \t some syntax error here """) - assert str(e.value) == "parse error\nbaz.c:9:14: before: syntax" + assert str(e.value).startswith("parse error\nbaz.c:9:") # e = pytest.raises(CDefError, ffi.cdef, """ # 7 "foo//bar.c" some syntax error here """) - assert str(e.value) == "parse error\nfoo//bar.c:8:14: before: syntax" + assert str(e.value).startswith("parse error\nfoo//bar.c:8:") def test_multiple_line_directives(): ffi = FFI(backend=FakeBackend()) @@ -233,7 +233,7 @@ def test_multiple_line_directives(): #line 8 "yadda.c" extern int zz; """) - assert str(e.value) == "parse error\nbaz.c:7:14: before: syntax" + assert str(e.value).startswith("parse error\nbaz.c:7:") # e = pytest.raises(CDefError, ffi.cdef, """ # 5 "foo.c" @@ -245,7 +245,7 @@ def test_multiple_line_directives(): # 8 "yadda.c" extern int zz; """) - assert str(e.value) == "parse error\nbaz.c:7:14: before: syntax" + assert str(e.value).startswith("parse error\nbaz.c:7:") def test_commented_line_directive(): ffi = FFI(backend=FakeBackend()) @@ -262,7 +262,7 @@ def test_commented_line_directive(): some syntax error """) # - assert str(e.value) == "parse error\nbar.c:9:14: before: syntax" + assert str(e.value).startswith("parse error\nbar.c:9:") e = pytest.raises(CDefError, ffi.cdef, """ /* # 5 "foo.c" @@ -275,7 +275,7 @@ def test_commented_line_directive(): */ some syntax error """) - assert str(e.value) == "parse error\nbar.c:9:14: before: syntax" + assert str(e.value).startswith("parse error\nbar.c:9:") def test_line_continuation_in_defines(): ffi = FFI(backend=FakeBackend()) @@ -365,7 +365,7 @@ def test_unknown_name(): e = pytest.raises(CDefError, ffi.cast, "foobarbazunknown*", 0) assert str(e.value).startswith('cannot parse "foobarbazunknown*"') e = pytest.raises(CDefError, ffi.cast, "int(*)(foobarbazunknown)", 0) - assert str(e.value).startswith('cannot parse "int(*)(foobarbazunknown)"') + assert str(e.value).startswith("in expression arg 1: unknown type 'foobarbazunknown'") def test_redefine_common_type(): prefix = "" if sys.version_info < (3,) else "b" >From 02d4417c84229d2eab426b9ab755ac1c435a333e Mon Sep 17 00:00:00 2001 From: Eli Bendersky <[email protected]> Date: Sat, 24 Jan 2026 14:51:01 -0800 Subject: [PATCH 2/2] Loosen error message assertion even more --- testing/cffi0/test_parsing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/cffi0/test_parsing.py b/testing/cffi0/test_parsing.py index d0f466bd..3e47bcdd 100644 --- a/testing/cffi0/test_parsing.py +++ b/testing/cffi0/test_parsing.py @@ -365,7 +365,7 @@ def test_unknown_name(): e = pytest.raises(CDefError, ffi.cast, "foobarbazunknown*", 0) assert str(e.value).startswith('cannot parse "foobarbazunknown*"') e = pytest.raises(CDefError, ffi.cast, "int(*)(foobarbazunknown)", 0) - assert str(e.value).startswith("in expression arg 1: unknown type 'foobarbazunknown'") + assert 'foobarbazunknown' in str(e.value) def test_redefine_common_type(): prefix = "" if sys.version_info < (3,) else "b"
