From 6b1d8ff41ab6307e91e1e73322410bcd339a4559a42663b01d6be659be32e4cf Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Fri, 16 Jun 2023 06:06:46 +0000 Subject: [PATCH] - Add patch use-real-ipv6-address.patch: * Use a real IPv6 address to avoid an address parsing exception OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-respx?expand=0&rev=11 --- python-respx.changes | 6 ++++++ python-respx.spec | 2 ++ use-real-ipv6-address.patch | 16 ++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 use-real-ipv6-address.patch diff --git a/python-respx.changes b/python-respx.changes index 74bf40c..fc57dac 100644 --- a/python-respx.changes +++ b/python-respx.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jun 16 06:03:28 UTC 2023 - Steve Kowalik + +- Add patch use-real-ipv6-address.patch: + * Use a real IPv6 address to avoid an address parsing exception + ------------------------------------------------------------------- Mon Jan 16 11:33:19 UTC 2023 - Daniel Garcia diff --git a/python-respx.spec b/python-respx.spec index f4fac71..354b78f 100644 --- a/python-respx.spec +++ b/python-respx.spec @@ -23,6 +23,8 @@ Summary: Mock HTTPX with request patterns and response side effects License: BSD-3-Clause URL: https://github.com/lundberg/respx Source0: https://github.com/lundberg/respx/archive/refs/tags/%{version}.tar.gz#/respx-%{version}.tar.gz +# PATCH-FIX-OPENSUSE Use a real IPV6 address to avoid a test failure +Patch0: use-real-ipv6-address.patch BuildRequires: %{python_module Flask} BuildRequires: %{python_module httpx} BuildRequires: %{python_module pytest-asyncio} diff --git a/use-real-ipv6-address.patch b/use-real-ipv6-address.patch new file mode 100644 index 0000000..162f1e5 --- /dev/null +++ b/use-real-ipv6-address.patch @@ -0,0 +1,16 @@ +Index: respx-0.20.1/tests/test_patterns.py +=================================================================== +--- respx-0.20.1.orig/tests/test_patterns.py ++++ respx-0.20.1/tests/test_patterns.py +@@ -280,9 +280,9 @@ def test_params_pattern_hash(): + (Lookup.STARTS_WITH, "http://a.b/baz/", {}, "https://a.b/baz/", False), + ( + Lookup.EQUAL, +- (b"https", b"fake:ipv6", None, b""), ++ (b"https", b"2001:db8::1", None, b""), + {}, +- "https://[fake:ipv6]", ++ "https://[2001:db8::1]", + True, + ), + ],