From 5907ccc01eebc6f5783bdaef1f24e2e649896568 Mon Sep 17 00:00:00 2001
From: jayvdb <>
Date: Mon, 27 Feb 2023 11:55:31 +0000
Subject: [PATCH] Update python-promise to version 2.3.0 / rev 5 via SR 1067864
https://build.opensuse.org/request/show/1067864
by user jayvdb + dimstar_suse
- Add python-311.patch to support python 3.11
gh#syrusakbary/promise#99
---
packages/p/python-promise/.files | Bin 246 -> 300 bytes
packages/p/python-promise/.rev | 10 +++++
packages/p/python-promise/python-311.patch | 41 ++++++++++++++++++
.../p/python-promise/python-promise.changes | 6 +++
packages/p/python-promise/python-promise.spec | 7 +--
5 files changed, 61 insertions(+), 3 deletions(-)
create mode 100644 packages/p/python-promise/python-311.patch
diff --git a/packages/p/python-promise/.files b/packages/p/python-promise/.files
index a97a2274e5596539237718b52fddf0ac8e74c6f3..5aa5b7da2fb08a67c50ef19c95525ba98cb7f01c 100644
GIT binary patch
delta 195
zcmZ9_yA8rH6ougcO5-$0NYohsqWB#*>|$TvODISzoQ8@SvIjFT7BxYlqB+(7>AY9Z
zb(QkemTXfLMLAce`PDsG9grJ>AdMplLTab2iBdR=jymOFiFfHf_2Y0%xAA((*yM!3
zYFcX3Dj%f|WOXMMmjPA$ZqOtaxcx!Nd6WDEJ*%yu7Gh9JBLz6L+>+NElpqr$A^L^w
L|Nfx&!x{4jxHmYW
delta 150
zcmZ9^I}(C05P;$MYC`FZH5ZTxd2B-CB|JfPS;0cc7#b_jz&$*lwW;m@@BeJSn=0i+
z9pp|3v0tmpyJzSDz%p1Qs}adr3J{cP+epfl?v!53I8W#FoFDhh4UKUcILkWRfP>eB
h=)iZ;Krz1jv{ykh^~E0lY)(wF?jqX2#$dNzn;$NtD%1b~
diff --git a/packages/p/python-promise/.rev b/packages/p/python-promise/.rev
index 509f26a8ddd..4d386dff656 100644
--- a/packages/p/python-promise/.rev
+++ b/packages/p/python-promise/.rev
@@ -35,4 +35,14 @@
* Support pytest 7.0+ changes.
983793
+
+ e8d7709c17e68324c24f47ceaa8a3f09
+ 2.3.0
+
+ dimstar_suse
+ - Add python-311.patch to support python 3.11
+ gh#syrusakbary/promise#99
+
+ 1067864
+
diff --git a/packages/p/python-promise/python-311.patch b/packages/p/python-promise/python-311.patch
new file mode 100644
index 00000000000..2653f7a7f1e
--- /dev/null
+++ b/packages/p/python-promise/python-311.patch
@@ -0,0 +1,41 @@
+diff --git a/tests/test_awaitable.py b/tests/test_awaitable.py
+index aad7f2c..a14a181 100644
+--- a/tests/test_awaitable.py
++++ b/tests/test_awaitable.py
+@@ -1,18 +1,15 @@
+-from asyncio import coroutine
+ from pytest import mark
+ from time import sleep
+ from promise import Promise
+
+
+ @mark.asyncio
+-@coroutine
+-def test_await():
+- yield from Promise.resolve(True)
++async def test_await():
++ await Promise.resolve(True)
+
+
+ @mark.asyncio
+-@coroutine
+-def test_await_time():
++async def test_await_time():
+ def resolve_or_reject(resolve, reject):
+ sleep(.1)
+ resolve(True)
+@@ -22,11 +19,9 @@ def resolve_or_reject(resolve, reject):
+
+
+ @mark.asyncio
+-@coroutine
+-def test_promise_coroutine():
+- @coroutine
+- def my_coro():
+- yield from Promise.resolve(True)
++async def test_promise_coroutine():
++ async def my_coro():
++ await Promise.resolve(True)
+
+ promise = Promise.resolve(my_coro())
+ assert isinstance(promise, Promise)
diff --git a/packages/p/python-promise/python-promise.changes b/packages/p/python-promise/python-promise.changes
index 572b1e0a5d2..fb9c3f45c5c 100644
--- a/packages/p/python-promise/python-promise.changes
+++ b/packages/p/python-promise/python-promise.changes
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+Fri Feb 24 11:14:52 UTC 2023 - Daniel Garcia
+
+- Add python-311.patch to support python 3.11
+ gh#syrusakbary/promise#99
+
-------------------------------------------------------------------
Mon Jun 20 02:53:04 UTC 2022 - Steve Kowalik
diff --git a/packages/p/python-promise/python-promise.spec b/packages/p/python-promise/python-promise.spec
index 51a7e6a8fdc..625a2af37ed 100644
--- a/packages/p/python-promise/python-promise.spec
+++ b/packages/p/python-promise/python-promise.spec
@@ -1,7 +1,7 @@
#
# spec file for package python-promise
#
-# 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,7 +16,6 @@
#
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-promise
Version: 2.3.0
Release: 0
@@ -26,6 +25,8 @@ 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
BuildRequires: %{python_module pytest-asyncio}
BuildRequires: %{python_module pytest-benchmark}
BuildRequires: %{python_module pytest}
@@ -56,6 +57,6 @@ This is an implementation of Promises in Python
%files %{python_files}
%doc README.rst
%license LICENSE
-%{python_sitelib}/*
+%{python_sitelib}/promise*
%changelog