- Remove py311-compat.patch, not needed anymore
- Update to 1.1.1: * Fix Py3.11 compatibility (#85) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pook?expand=0&rev=13
This commit is contained in:
parent
1c268d0299
commit
dfbdde2fcb
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:bda6e301706945e9769bf5aaba01063229aadd7bc6c244a83e2257ece695536c
|
||||
size 41879
|
BIN
pook-1.1.1.tar.gz
(Stored with Git LFS)
Normal file
BIN
pook-1.1.1.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -1,38 +0,0 @@
|
||||
Index: pook-1.1.0/pook/activate_async.py
|
||||
===================================================================
|
||||
--- pook-1.1.0.orig/pook/activate_async.py
|
||||
+++ pook-1.1.0/pook/activate_async.py
|
||||
@@ -1,5 +1,5 @@
|
||||
import functools
|
||||
-from asyncio import iscoroutinefunction, coroutine
|
||||
+from asyncio import iscoroutinefunction
|
||||
|
||||
|
||||
def activate_async(fn, _engine):
|
||||
@@ -13,13 +13,13 @@ def activate_async(fn, _engine):
|
||||
Returns:
|
||||
function: decorator wrapper function.
|
||||
"""
|
||||
- @coroutine
|
||||
@functools.wraps(fn)
|
||||
- def wrapper(*args, **kw):
|
||||
+ async def wrapper(*args, **kw):
|
||||
_engine.activate()
|
||||
try:
|
||||
if iscoroutinefunction(fn):
|
||||
- yield from fn(*args, **kw) # noqa
|
||||
+ async for v in fn(*args, **kw):
|
||||
+ yield v
|
||||
else:
|
||||
fn(*args, **kw)
|
||||
finally:
|
||||
Index: pook-1.1.0/tests/unit/mock_test.py
|
||||
===================================================================
|
||||
--- pook-1.1.0.orig/tests/unit/mock_test.py
|
||||
+++ pook-1.1.0/tests/unit/mock_test.py
|
||||
@@ -19,4 +19,4 @@ def test_mock_url(mock):
|
||||
|
||||
|
||||
def test_new_response(mock):
|
||||
- assert(mock.reply() != mock.reply(new_response=True, json={}))
|
||||
+ assert mock.reply() != mock.reply(new_response=True, json={})
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 13 06:33:49 UTC 2023 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
- Remove py311-compat.patch, not needed anymore
|
||||
- Update to 1.1.1:
|
||||
* Fix Py3.11 compatibility (#85)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 12 11:04:56 UTC 2023 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
|
@ -19,14 +19,12 @@
|
||||
# requires python-aiohttp
|
||||
%define skip_python2 1
|
||||
Name: python-pook
|
||||
Version: 1.1.0
|
||||
Version: 1.1.1
|
||||
Release: 0
|
||||
Summary: HTTP traffic mocking and expectations
|
||||
License: MIT
|
||||
URL: https://github.com/h2non/pook
|
||||
Source: https://files.pythonhosted.org/packages/source/p/pook/pook-%{version}.tar.gz
|
||||
# PATCH-FIX-OPENSUSE py311-compat.patch gh#h2non/pook#83
|
||||
Patch: py311-compat.patch
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
|
Loading…
Reference in New Issue
Block a user