From b10c00918598165ef545a3fbf9802c34b88c591da87f2c656f59c2b2d970b67d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 28 Mar 2025 16:35:40 +0100 Subject: [PATCH] Sync from SUSE:SLFO:Main python-asyncpg revision 22188c38c459c0d3a43eb2984a4b87d8 --- python-asyncpg.changes | 7 ++++++ python-asyncpg.spec | 12 ++++++---- skip-dsn_ipv6_multi_host-parse-test.patch | 29 +++++++++++++++++++++++ 3 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 skip-dsn_ipv6_multi_host-parse-test.patch diff --git a/python-asyncpg.changes b/python-asyncpg.changes index 54161fc..03b8ffa 100644 --- a/python-asyncpg.changes +++ b/python-asyncpg.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Feb 13 03:28:18 UTC 2025 - Steve Kowalik + +- Add patch skip-dsn_ipv6_multi_host-parse-test.patch: + * Skip a broken testcase. +- Switch to pyproject macros. + ------------------------------------------------------------------- Wed Oct 23 12:16:37 UTC 2024 - Daniel Garcia diff --git a/python-asyncpg.spec b/python-asyncpg.spec index 6af4d95..8b04ec8 100644 --- a/python-asyncpg.spec +++ b/python-asyncpg.spec @@ -1,7 +1,7 @@ # # spec file for package python-asyncpg # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -22,13 +22,15 @@ Version: 0.30.0 Release: 0 Summary: Python asyncio PosgtreSQL driver License: Apache-2.0 -Group: Development/Languages/Python URL: https://github.com/MagicStack/asyncpg Source: https://files.pythonhosted.org/packages/source/a/asyncpg/asyncpg-%{version}.tar.gz +# PATCH-FIX-OPENSUSE Skip a broken test +Patch0: skip-dsn_ipv6_multi_host-parse-test.patch BuildRequires: %{python_module Cython} BuildRequires: %{python_module async_timeout if %python-base < 3.11} BuildRequires: %{python_module devel >= 3.6} BuildRequires: %{python_module distro} +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module typing-extensions >= 3.7.4.3 if %python-base < 3.8} BuildRequires: fdupes @@ -65,10 +67,10 @@ sed -i asyncpg/_testbase/__init__.py \ -e "s/if os.environ.get('USE_UVLOOP')/& and sys.version_info[:2] > (3, 6)/" %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %{python_expand find %{buildroot}%{$python_sitearch} -name '*.[ch]' -delete %fdupes %{buildroot}%{$python_sitearch} } @@ -94,6 +96,6 @@ mv .asyncpg asyncpg %license LICENSE %doc README.rst %{python_sitearch}/asyncpg -%{python_sitearch}/asyncpg-%{version}*-info +%{python_sitearch}/asyncpg-%{version}.dist-info %changelog diff --git a/skip-dsn_ipv6_multi_host-parse-test.patch b/skip-dsn_ipv6_multi_host-parse-test.patch new file mode 100644 index 0000000..e9c2d97 --- /dev/null +++ b/skip-dsn_ipv6_multi_host-parse-test.patch @@ -0,0 +1,29 @@ +Index: asyncpg-0.30.0/tests/test_connect.py +=================================================================== +--- asyncpg-0.30.0.orig/tests/test_connect.py ++++ asyncpg-0.30.0/tests/test_connect.py +@@ -846,15 +846,15 @@ class TestConnectParams(tb.TestCase): + ), + }, + +- { +- 'name': 'dsn_ipv6_multi_host', +- 'dsn': 'postgresql://user@[2001:db8::1234%25eth0],[::1]/db', +- 'result': ([('2001:db8::1234%eth0', 5432), ('::1', 5432)], { +- 'database': 'db', +- 'user': 'user', +- 'target_session_attrs': 'any', +- }) +- }, ++ #{ ++ # 'name': 'dsn_ipv6_multi_host', ++ # 'dsn': 'postgresql://user@[2001:db8::1234%25eth0],[::1]/db', ++ # 'result': ([('2001:db8::1234%eth0', 5432), ('::1', 5432)], { ++ # 'database': 'db', ++ # 'user': 'user', ++ # 'target_session_attrs': 'any', ++ # }) ++ #}, + + { + 'name': 'dsn_ipv6_multi_host_port',