14
0

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
This commit is contained in:
2023-06-07 10:10:37 +00:00
committed by Git OBS Bridge
parent 965c333517
commit c7d4c4b514
3 changed files with 44 additions and 2 deletions

View File

@@ -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,
)

View File

@@ -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 <daniel.garcia@suse.com>

View File

@@ -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