From f09f600ddb2082009f0779379aa82402ccf4f2952e4fc33659b5678c76ab5126 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Tue, 7 Mar 2023 06:29:47 +0000 Subject: [PATCH] - Add patc support-trio-0.22.patch: * Support trio >= 0.22 just enough for asyncclick. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-anyio?expand=0&rev=21 --- python-anyio.changes | 6 ++++++ python-anyio.spec | 6 +++--- support-trio-0.22.patch | 22 ++++++++++++++++++++++ 3 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 support-trio-0.22.patch diff --git a/python-anyio.changes b/python-anyio.changes index d2f6d21..70394b1 100644 --- a/python-anyio.changes +++ b/python-anyio.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Mar 7 06:29:28 UTC 2023 - Steve Kowalik + +- Add patc support-trio-0.22.patch: + * Support trio >= 0.22 just enough for asyncclick. + ------------------------------------------------------------------- Fri Dec 16 15:06:08 UTC 2022 - Markéta Machová diff --git a/python-anyio.spec b/python-anyio.spec index 1cb1429..b60363f 100644 --- a/python-anyio.spec +++ b/python-anyio.spec @@ -1,7 +1,7 @@ # # spec file for package python-anyio # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,8 +16,6 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} -%define skip_python2 1 Name: python-anyio Version: 3.6.2 Release: 0 @@ -25,6 +23,8 @@ Summary: High level compatibility layer for asynchronous event loop imple License: MIT URL: https://github.com/agronholm/anyio Source: https://files.pythonhosted.org/packages/source/a/anyio/anyio-%{version}.tar.gz +# PATCH-FIX-OPENSUSE Support trio >= 0.22 just enough for asyncclick +Patch0: support-trio-0.22.patch BuildRequires: %{python_module contextlib2 if %python-base < 3.7} BuildRequires: %{python_module dataclasses if %python-base < 3.7} BuildRequires: %{python_module idna >= 2.8} diff --git a/support-trio-0.22.patch b/support-trio-0.22.patch new file mode 100644 index 0000000..14371d8 --- /dev/null +++ b/support-trio-0.22.patch @@ -0,0 +1,22 @@ +Index: anyio-3.6.2/src/anyio/_backends/_trio.py +=================================================================== +--- anyio-3.6.2.orig/src/anyio/_backends/_trio.py ++++ anyio-3.6.2/src/anyio/_backends/_trio.py +@@ -161,7 +161,7 @@ current_time = trio.current_time + # + + +-class ExceptionGroup(BaseExceptionGroup, trio.MultiError): ++class ExceptionGroup(BaseExceptionGroup): + pass + + +@@ -185,7 +185,7 @@ class TaskGroup(abc.TaskGroup): + ) -> Optional[bool]: + try: + return await self._nursery_manager.__aexit__(exc_type, exc_val, exc_tb) +- except trio.MultiError as exc: ++ except ExceptionGroup as exc: + raise ExceptionGroup(exc.exceptions) from None + finally: + self._active = False