diff --git a/py314.patch b/py314.patch new file mode 100644 index 0000000..ff832e1 --- /dev/null +++ b/py314.patch @@ -0,0 +1,13 @@ +Index: graphviz-0.21/tests/test_quoting.py +=================================================================== +--- graphviz-0.21.orig/tests/test_quoting.py ++++ graphviz-0.21/tests/test_quoting.py +@@ -17,7 +17,7 @@ def test_deprecated_escape(recwarn, char + assert len(recwarn) == 1 + w = recwarn.pop(DeprecationWarning if sys.version_info < (3, 12) + else SyntaxWarning) +- assert str(w.message).startswith('invalid escape sequence') ++ assert 'invalid escape sequence' in str(w.message) + + assert escape == f'\\{char}' + assert quoting.quote(escape) == f'"\\{char}"' diff --git a/python-graphviz.changes b/python-graphviz.changes index b409a21..ce421b9 100644 --- a/python-graphviz.changes +++ b/python-graphviz.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Sep 9 14:31:30 UTC 2025 - Markéta Machová + +- Add py314.patch to fix tests with Python 3.14 + ------------------------------------------------------------------- Wed Jul 2 07:55:23 UTC 2025 - John Paul Adrian Glaubitz diff --git a/python-graphviz.spec b/python-graphviz.spec index 79bda4a..94ea421 100644 --- a/python-graphviz.spec +++ b/python-graphviz.spec @@ -1,7 +1,7 @@ # # spec file for package python-graphviz # -# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2025 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 @@ -24,6 +24,8 @@ Summary: Python interface for Graphviz License: MIT URL: https://github.com/xflr6/graphviz Source: https://files.pythonhosted.org/packages/source/g/graphviz/graphviz-%{version}.tar.gz +# PATCH-FIX-UPSTREAM https://github.com/xflr6/graphviz/pull/238 fix tests on Python 3.14 +Patch0: py314.patch BuildRequires: %{python_module base >= 3.8} BuildRequires: %{python_module coverage} BuildRequires: %{python_module pip}