Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-promise for openSUSE:Factory 
checked in at 2023-02-27 12:55:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-promise (Old)
 and      /work/SRC/openSUSE:Factory/.python-promise.new.31432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-promise"

Mon Feb 27 12:55:30 2023 rev:5 rq:1067864 version:2.3.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-promise/python-promise.changes    
2022-06-20 15:38:54.123002225 +0200
+++ /work/SRC/openSUSE:Factory/.python-promise.new.31432/python-promise.changes 
2023-02-27 12:55:31.679481518 +0100
@@ -1,0 +2,6 @@
+Fri Feb 24 11:14:52 UTC 2023 - Daniel Garcia <daniel.gar...@suse.com>
+
+- Add python-311.patch to support python 3.11
+  gh#syrusakbary/promise#99
+
+-------------------------------------------------------------------

New:
----
  python-311.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-promise.spec ++++++
--- /var/tmp/diff_new_pack.hyw4hS/_old  2023-02-27 12:55:32.159484476 +0100
+++ /var/tmp/diff_new_pack.hyw4hS/_new  2023-02-27 12:55:32.163484501 +0100
@@ -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 @@
 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 @@
 %files %{python_files}
 %doc README.rst
 %license LICENSE
-%{python_sitelib}/*
+%{python_sitelib}/promise*
 
 %changelog

++++++ python-311.patch ++++++
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)

Reply via email to