From 57db4fd86aa9a0ca54c91abc13887e8ec05ab7a039b4e1459e1a2aeb3bfe8bba Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Mon, 15 Sep 2025 03:03:32 +0000 Subject: [PATCH] - Add patch support-dnspython-2.8.0.patch: * Support dnspython 2.8.0 changes. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-localzone?expand=0&rev=20 --- python-localzone.changes | 6 ++++++ python-localzone.spec | 7 ++++--- support-dnspython-2.8.0.patch | 24 ++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 support-dnspython-2.8.0.patch diff --git a/python-localzone.changes b/python-localzone.changes index 470a859..dc82d6b 100644 --- a/python-localzone.changes +++ b/python-localzone.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Sep 15 03:02:51 UTC 2025 - Steve Kowalik + +- Add patch support-dnspython-2.8.0.patch: + * Support dnspython 2.8.0 changes. + ------------------------------------------------------------------- Mon Jun 2 07:54:20 UTC 2025 - Markéta Machová diff --git a/python-localzone.spec b/python-localzone.spec index 54f090c..a93725c 100644 --- a/python-localzone.spec +++ b/python-localzone.spec @@ -1,7 +1,7 @@ # # spec file for package python-localzone # -# 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 @@ -22,10 +22,11 @@ Version: 0.9.8 Release: 0 Summary: A library for managing DNS zones License: BSD-3-Clause -Group: Development/Languages/Python URL: https://github.com/ags-slc/localzone # The PyPI sdist does not provide the tests Source: https://github.com/ags-slc/localzone/archive/v%{version}.tar.gz#/localzone-%{version}.tar.gz +# PATCH-FIX-UPSTREAM gh#ags-slc/localzone#6 +Patch0: support-dnspython-2.8.0.patch BuildRequires: %{python_module dnspython} BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest} @@ -57,6 +58,6 @@ A simple library for managing DNS zones. %doc README.rst %license LICENSE %{python_sitelib}/localzone -%{python_sitelib}/localzone-%{version}*-info +%{python_sitelib}/localzone-%{version}.dist-info %changelog diff --git a/support-dnspython-2.8.0.patch b/support-dnspython-2.8.0.patch new file mode 100644 index 0000000..f236374 --- /dev/null +++ b/support-dnspython-2.8.0.patch @@ -0,0 +1,24 @@ +From 200f4b47187c137340781ba05f3b79738f86ffa1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Lum=C3=ADr=20=27Frenzy=27=20Balhar?= + +Date: Tue, 9 Sep 2025 13:17:37 +0200 +Subject: [PATCH] Fix test_zone_add_record_no_content with dnspython 2.8.0 + +Fixes: https://github.com/ags-slc/localzone/issues/5 +--- + tests/test_models.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/test_models.py b/tests/test_models.py +index 621f6c0..b4e8687 100644 +--- a/tests/test_models.py ++++ b/tests/test_models.py +@@ -78,7 +78,7 @@ def test_zone_add_record_unknown_type(): + + def test_zone_add_record_no_content(): + with localzone.manage(ZONEFILE, ORIGIN) as z: +- with pytest.raises((AttributeError, DNSSyntaxError)): ++ with pytest.raises((AttributeError, DNSSyntaxError, ValueError)): + z.add_record("test", "txt", None) + +