-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
ee7d95b
commit 5907ccc
Showing
5 changed files
with
61 additions
and
3 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
------------------------------------------------------------------- | ||
Fri Feb 24 11:14:52 UTC 2023 - Daniel Garcia <[email protected]> | ||
|
||
- Add python-311.patch to support python 3.11 | ||
gh#syrusakbary/promise#99 | ||
|
||
------------------------------------------------------------------- | ||
Mon Jun 20 02:53:04 UTC 2022 - Steve Kowalik <[email protected]> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters