From c7d4c4b51402e25ea1bfbc8765488f2c09ea4275529e052ca6ef58f9b685cb1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Wed, 7 Jun 2023 10:10:37 +0000 Subject: [PATCH] Accepting request 1091223 from home:pgajdos:python - do not require six - added patches fix https://github.com/syrusakbary/promise/issues/101 + python-promise-no-six.patch OBS-URL: https://build.opensuse.org/request/show/1091223 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-promise?expand=0&rev=13 --- python-promise-no-six.patch | 33 +++++++++++++++++++++++++++++++++ python-promise.changes | 8 ++++++++ python-promise.spec | 5 +++-- 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 python-promise-no-six.patch diff --git a/python-promise-no-six.patch b/python-promise-no-six.patch new file mode 100644 index 0000000..9d30c62 --- /dev/null +++ b/python-promise-no-six.patch @@ -0,0 +1,33 @@ +Index: promise-2.3.0/promise/promise.py +=================================================================== +--- promise-2.3.0.orig/promise/promise.py ++++ promise-2.3.0/promise/promise.py +@@ -5,7 +5,6 @@ from threading import RLock + from types import TracebackType + from weakref import WeakKeyDictionary + +-from six import reraise # type: ignore + from .async_ import Async + from .compat import ( + Future, +@@ -223,7 +222,7 @@ class Promise(Generic[T]): + elif self._state == STATE_REJECTED: + if _raise: + raise_val = self._fulfillment_handler0 +- reraise(type(raise_val), raise_val, self._traceback) ++ raise raise_val.with_traceback(self._traceback) + return self._fulfillment_handler0 + + def _fulfill(self, value): +Index: promise-2.3.0/setup.py +=================================================================== +--- promise-2.3.0.orig/setup.py ++++ promise-2.3.0/setup.py +@@ -58,7 +58,6 @@ setup( + extras_require={"test": tests_require}, + install_requires=[ + "typing>=3.6.4; python_version < '3.5'", +- "six" + ], + tests_require=tests_require, + ) diff --git a/python-promise.changes b/python-promise.changes index 3f2add4..51103ff 100644 --- a/python-promise.changes +++ b/python-promise.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Jun 7 08:08:55 UTC 2023 - pgajdos@suse.com + +- do not require six +- added patches + fix https://github.com/syrusakbary/promise/issues/101 + + python-promise-no-six.patch + ------------------------------------------------------------------- Fri Feb 24 11:14:52 UTC 2023 - Daniel Garcia diff --git a/python-promise.spec b/python-promise.spec index e44968a..a3098c0 100644 --- a/python-promise.spec +++ b/python-promise.spec @@ -21,20 +21,21 @@ Version: 2.3.0 Release: 0 Summary: Promises/A+ implementation for Python License: MIT +Group: Development/Languages/Python URL: https://github.com/syrusakbary/promise Source: https://github.com/syrusakbary/promise/archive/v%{version}.tar.gz#/promise-%{version}.tar.gz # PATCH-FIX-UPSTREAM gh#syrusakbary/promise#96 Patch0: pytest-7-support.patch # PATCH-FIX-UPSTREAM python-311.patch gh#syrusakbary/promise#99 Patch1: python-311.patch +# https://github.com/syrusakbary/promise/issues/101 +Patch2: python-promise-no-six.patch BuildRequires: %{python_module pytest-asyncio} BuildRequires: %{python_module pytest-benchmark} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} -BuildRequires: %{python_module six} BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-six BuildArch: noarch %python_subpackages