Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-pook for openSUSE:Factory 
checked in at 2023-01-14 00:02:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pook (Old)
 and      /work/SRC/openSUSE:Factory/.python-pook.new.32243 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pook"

Sat Jan 14 00:02:28 2023 rev:7 rq:1058121 version:1.1.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pook/python-pook.changes  2022-04-08 
00:27:51.234231261 +0200
+++ /work/SRC/openSUSE:Factory/.python-pook.new.32243/python-pook.changes       
2023-01-14 00:02:51.977588074 +0100
@@ -1,0 +2,16 @@
+Fri Jan 13 06:33:49 UTC 2023 - Daniel Garcia <[email protected]>
+
+- 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 <[email protected]>
+
+- Add py311-compat.patch to fix python-3.11 compatibility
+- Update to 1.1.0:
+  * chore(version): bump minor v1.1.0
+  * Switch to Python >= 3.5 and fix latest aiohttp compatability (#83)
+  * fix: remove print call (#81)
+
+-------------------------------------------------------------------

Old:
----
  pook-1.0.2.tar.gz

New:
----
  pook-1.1.1.tar.gz

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

Other differences:
------------------
++++++ python-pook.spec ++++++
--- /var/tmp/diff_new_pack.SnBzl9/_old  2023-01-14 00:02:52.789592803 +0100
+++ /var/tmp/diff_new_pack.SnBzl9/_new  2023-01-14 00:02:52.789592803 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-pook
 #
-# 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,11 +16,10 @@
 #
 
 
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
 # requires python-aiohttp
 %define skip_python2 1
 Name:           python-pook
-Version:        1.0.2
+Version:        1.1.1
 Release:        0
 Summary:        HTTP traffic mocking and expectations
 License:        MIT
@@ -50,7 +49,7 @@
 HTTP traffic mocking and expectations.
 
 %prep
-%setup -q -n pook-%{version}
+%autosetup -p1 -n pook-%{version}
 rm -f setup.cfg pytest.ini tox.ini
 
 # Assist unittest on Python 2
@@ -77,6 +76,7 @@
 %files %{python_files}
 %doc README.rst
 %license LICENSE
-%{python_sitelib}/*
+%{python_sitelib}/pook
+%{python_sitelib}/pook-%{version}*-info
 
 %changelog

++++++ pook-1.0.2.tar.gz -> pook-1.1.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pook-1.0.2/History.rst new/pook-1.1.1/History.rst
--- old/pook-1.0.2/History.rst  2021-09-10 16:36:40.000000000 +0200
+++ new/pook-1.1.1/History.rst  2023-01-01 17:34:33.000000000 +0100
@@ -1,4 +1,11 @@
 
+v1.1.0 / 2023-01-01
+===================
+
+  * chore(version): bump minor v1.1.0
+  * Switch to Python >= 3.5 and fix latest aiohttp compatability (#83)
+  * fix: remove print call (#81)
+
 v1.0.2 / 2021-09-10
 ===================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pook-1.0.2/PKG-INFO new/pook-1.1.1/PKG-INFO
--- old/pook-1.0.2/PKG-INFO     2021-09-10 16:38:20.000000000 +0200
+++ new/pook-1.1.1/PKG-INFO     2023-01-12 16:54:45.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: pook
-Version: 1.0.2
+Version: 1.1.1
 Summary: HTTP traffic mocking and expectations made easy
 Home-page: https://github.com/h2non/pook
 Author: Tomas Aparicio
@@ -39,7 +39,7 @@
         -  Supports third-party mocking engines, such as `mocket`_.
         -  Fits good for painless test doubles.
         -  Does not support WebSocket traffic mocking.
-        -  Works with Python +2.7 and +3.0 (including PyPy).
+        -  Works with +3.5 (including PyPy).
         -  Dependency-less: just 2 small dependencies for JSONSchema and XML 
tree comparison.
         
         
@@ -335,6 +335,13 @@
         
         
         
+        v1.1.0 / 2023-01-01
+        ===================
+        
+          * chore(version): bump minor v1.1.0
+          * Switch to Python >= 3.5 and fix latest aiohttp compatability (#83)
+          * fix: remove print call (#81)
+        
         v1.0.2 / 2021-09-10
         ===================
         
@@ -525,11 +532,13 @@
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Natural Language :: English
 Classifier: License :: OSI Approved :: MIT License
-Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
+Classifier: Programming Language :: Python :: 3.10
+Classifier: Programming Language :: Python :: 3.11
 Classifier: Topic :: Software Development
 Classifier: Topic :: Software Development :: Libraries :: Python Modules
 Classifier: Programming Language :: Python :: Implementation :: CPython
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pook-1.0.2/README.rst new/pook-1.1.1/README.rst
--- old/pook-1.0.2/README.rst   2019-10-22 21:14:17.000000000 +0200
+++ new/pook-1.1.1/README.rst   2023-01-01 17:33:51.000000000 +0100
@@ -31,7 +31,7 @@
 -  Supports third-party mocking engines, such as `mocket`_.
 -  Fits good for painless test doubles.
 -  Does not support WebSocket traffic mocking.
--  Works with Python +2.7 and +3.0 (including PyPy).
+-  Works with +3.5 (including PyPy).
 -  Dependency-less: just 2 small dependencies for JSONSchema and XML tree 
comparison.
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pook-1.0.2/pook/__init__.py 
new/pook-1.1.1/pook/__init__.py
--- old/pook-1.0.2/pook/__init__.py     2021-09-10 16:36:03.000000000 +0200
+++ new/pook-1.1.1/pook/__init__.py     2023-01-12 16:54:41.000000000 +0100
@@ -9,4 +9,4 @@
 __license__ = 'MIT'
 
 # Current version
-__version__ = '1.0.2'
+__version__ = '1.1.1'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pook-1.0.2/pook/activate_async.py 
new/pook-1.1.1/pook/activate_async.py
--- old/pook-1.0.2/pook/activate_async.py       2019-10-22 21:14:17.000000000 
+0200
+++ new/pook-1.1.1/pook/activate_async.py       2023-01-12 16:54:41.000000000 
+0100
@@ -1,5 +1,5 @@
 import functools
-from asyncio import iscoroutinefunction, coroutine
+from asyncio import iscoroutinefunction
 
 
 def activate_async(fn, _engine):
@@ -13,13 +13,13 @@
     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:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pook-1.0.2/pook/assertion.py 
new/pook-1.1.1/pook/assertion.py
--- old/pook-1.0.2/pook/assertion.py    2019-10-22 21:14:17.000000000 +0200
+++ new/pook-1.1.1/pook/assertion.py    2023-01-01 17:33:51.000000000 +0100
@@ -1,11 +1,6 @@
-import re
-import sys
 from unittest import TestCase
 from .regex import isregex, strip_regex, isregex_expr
 
-# If running Python 3
-PY_3 = sys.version_info >= (3,)
-
 
 def test_case():
     """
@@ -33,8 +28,7 @@
     Returns:
         bool
     """
-    if PY_3:
-        return test_case().assertEqual(x, y) or True
+    return test_case().assertEqual(x, y) or True
 
     assert x == y
 
@@ -59,17 +53,10 @@
     x = strip_regex(x) if regex_expr and isregex_expr(x) else x
 
     # Run regex assertion
-    if PY_3:
-        # Retrieve original regex pattern
-        x = x.pattern if isregex(x) else x
-        # Assert regular expression via unittest matchers
-        return test_case().assertRegex(y, x) or True
-
-    # Primitive regex matching for Python 2.7
-    if isinstance(x, str):
-        x = re.compile(x, re.IGNORECASE)
-
-    assert x.match(y) is not None
+    # Retrieve original regex pattern
+    x = x.pattern if isregex(x) else x
+    # Assert regular expression via unittest matchers
+    return test_case().assertRegex(y, x) or True
 
 
 def test(x, y, regex_expr=False):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pook-1.0.2/pook/headers.py 
new/pook-1.1.1/pook/headers.py
--- old/pook-1.0.2/pook/headers.py      2019-10-31 10:48:48.000000000 +0100
+++ new/pook-1.1.1/pook/headers.py      2023-01-01 17:33:51.000000000 +0100
@@ -1,11 +1,8 @@
-import sys
 try:
     from collections.abc import Mapping, MutableMapping
 except ImportError:
     from collections import Mapping, MutableMapping
 
-PY3 = sys.version_info >= (3, 0)
-
 
 class HTTPHeaderDict(MutableMapping):
     """
@@ -75,10 +72,6 @@
     def __ne__(self, other):
         return not self.__eq__(other)
 
-    if not PY3:  # Python 2
-        iterkeys = MutableMapping.iterkeys
-        itervalues = MutableMapping.itervalues
-
     __marker = object()
 
     def __len__(self):
@@ -245,24 +238,3 @@
 
     def to_dict(self):
         return {key: values for key, values in self.items()}
-
-    @classmethod
-    def from_httplib(cls, message):  # Python 2
-        """
-        Read headers from a Python 2 httplib message object.
-        """
-        # python2.7 does not expose a proper API for exporting multiheaders
-        # efficiently. This function re-reads raw lines from the message
-        # object and extracts the multiheaders properly.
-        headers = []
-
-        for line in message.headers:
-            if line.startswith((' ', '\t')):
-                key, value = headers[-1]
-                headers[-1] = (key, value + '\r\n' + line.rstrip())
-                continue
-
-            key, value = line.split(':', 1)
-            headers.append((key, value.strip()))
-
-        return cls(headers)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pook-1.0.2/pook/interceptors/__init__.py 
new/pook-1.1.1/pook/interceptors/__init__.py
--- old/pook-1.0.2/pook/interceptors/__init__.py        2020-03-24 
14:22:40.000000000 +0100
+++ new/pook-1.1.1/pook/interceptors/__init__.py        2023-01-01 
17:33:51.000000000 +0100
@@ -1,4 +1,3 @@
-import sys
 from .urllib3 import Urllib3Interceptor
 from .http import HTTPClientInterceptor
 from .base import BaseInterceptor
@@ -18,14 +17,12 @@
     HTTPClientInterceptor
 ]
 
-# Import aiohttp in modern Python runtimes
-if sys.version_info >= (3, 5, 0):
-    try:
-        import aiohttp # noqa
-        from .aiohttp import AIOHTTPInterceptor
-        interceptors.append(AIOHTTPInterceptor)
-    except ImportError:
-        pass
+try:
+    import aiohttp # noqa
+    from .aiohttp import AIOHTTPInterceptor
+    interceptors.append(AIOHTTPInterceptor)
+except ImportError:
+    pass
 
 
 def add(*custom_interceptors):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pook-1.0.2/pook/interceptors/aiohttp.py 
new/pook-1.1.1/pook/interceptors/aiohttp.py
--- old/pook-1.0.2/pook/interceptors/aiohttp.py 2020-03-19 00:12:59.000000000 
+0100
+++ new/pook-1.1.1/pook/interceptors/aiohttp.py 2023-01-01 17:33:51.000000000 
+0100
@@ -1,28 +1,14 @@
-import sys
 from ..request import Request
 from .base import BaseInterceptor
 
-# Support Python 2/3
-try:
-    import mock
-except Exception:
-    from unittest import mock
+from unittest import mock
 
-if sys.version_info < (3,):     # Python 2
-    from urlparse import urlunparse, urlencode
-    from httplib import responses as http_reasons
-else:                           # Python 3
-    from urllib.parse import urlunparse, urlencode
-    from http.client import responses as http_reasons
-
-if sys.version_info >= (3, 5, 0):  # Python 3.5+
-    import asyncio
-    from aiohttp.helpers import TimerNoop
-    from aiohttp.streams import EmptyStreamReader
-else:
-    asyncio = None
-    TimerNoop = None
-    EmptyStreamReader = None
+from urllib.parse import urlunparse, urlencode
+from http.client import responses as http_reasons
+
+import asyncio
+from aiohttp.helpers import TimerNoop
+from aiohttp.streams import EmptyStreamReader
 
 # Try to load yarl URL parser package used by aiohttp
 try:
@@ -44,8 +30,7 @@
         super().__init__(*args, **kwargs)
         self.content = content
 
-    @asyncio.coroutine
-    def read(self, n=-1):
+    async def read(self, n=-1):
         return self.content
 
 
@@ -76,9 +61,8 @@
     def _url(self, url):
         return yarl.URL(url) if yarl else None
 
-    @asyncio.coroutine
-    def _on_request(self, _request, session, method, url,
-                    data=None, headers=None, **kw):
+    async def _on_request(self, _request, session, method, url,
+                          data=None, headers=None, **kw):
         # Create request contract based on incoming params
         req = Request(method)
         req.headers = headers or {}
@@ -102,12 +86,12 @@
         # or silent model are enabled, otherwise this statement won't
         # be reached (an exception will be raised before).
         if not mock:
-            return _request(session, method, url,
-                            data=data, headers=headers, **kw)
+            return await _request(session, method, url,
+                                  data=data, headers=headers, **kw)
 
         # Simulate network delay
         if mock._delay:
-            yield from asyncio.sleep(mock._delay / 1000)  # noqa
+            await asyncio.sleep(mock._delay / 1000)  # noqa
 
         # Shortcut to mock response
         res = mock._response
@@ -145,16 +129,14 @@
         return _res
 
     def _patch(self, path):
-        # If not modern Python, just ignore patch
-        if not asyncio:
+        # If not able to import aiohttp dependencies, skip
+        if not yarl or not multidict:
             return None
 
-        @asyncio.coroutine
-        def handler(session, method, url, data=None, headers=None, **kw):
-            return (yield from self._on_request(
+        async def handler(session, method, url, data=None, headers=None, **kw):
+            return await self._on_request(
                 _request, session, method, url,
                 data=data, headers=headers, **kw)
-            )
 
         try:
             # Create a new patcher for Urllib3 urlopen function
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pook-1.0.2/pook/interceptors/http.py 
new/pook-1.1.1/pook/interceptors/http.py
--- old/pook-1.0.2/pook/interceptors/http.py    2019-10-22 21:14:17.000000000 
+0200
+++ new/pook-1.1.1/pook/interceptors/http.py    2023-01-01 17:33:51.000000000 
+0100
@@ -1,18 +1,10 @@
-import sys
 import socket
 from ..request import Request
 from .base import BaseInterceptor
 
-# Support Python 2/3
-try:
-    import mock
-except Exception:
-    from unittest import mock
+from unittest import mock
 
-if sys.version_info < (3,):     # Python 2
-    from httplib import responses as http_reasons, _CS_REQ_SENT
-else:                           # Python 3
-    from http.client import responses as http_reasons, _CS_REQ_SENT
+from http.client import responses as http_reasons, _CS_REQ_SENT
 
 PATCHES = (
     'http.client.HTTPConnection.request',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pook-1.0.2/pook/interceptors/urllib3.py 
new/pook-1.1.1/pook/interceptors/urllib3.py
--- old/pook-1.0.2/pook/interceptors/urllib3.py 2021-09-10 16:31:11.000000000 
+0200
+++ new/pook-1.1.1/pook/interceptors/urllib3.py 2023-01-01 17:33:51.000000000 
+0100
@@ -1,25 +1,14 @@
 import io
-import sys
 from ..request import Request
 from .base import BaseInterceptor
 from .http import URLLIB3_BYPASS
 
-# Support Python 2/3
-try:
-    import mock
-except Exception:
-    from unittest import mock
+from unittest import mock
 
-if sys.version_info < (3,):     # Python 2
-    from httplib import (
-        responses as http_reasons,
-        HTTPResponse as ClientHTTPResponse,
-    )
-else:                           # Python 3
-    from http.client import (
-        responses as http_reasons,
-        HTTPResponse as ClientHTTPResponse,
-    )
+from http.client import (
+    responses as http_reasons,
+    HTTPResponse as ClientHTTPResponse,
+)
 
 PATCHES = (
     'requests.packages.urllib3.connectionpool.HTTPConnectionPool.urlopen',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pook-1.0.2/pook/matchers/headers.py 
new/pook-1.1.1/pook/matchers/headers.py
--- old/pook-1.0.2/pook/matchers/headers.py     2019-10-22 21:14:17.000000000 
+0200
+++ new/pook-1.1.1/pook/matchers/headers.py     2022-02-03 20:40:20.000000000 
+0100
@@ -21,7 +21,6 @@
             header = req.headers.get(key)
 
             # Compare header value
-            print('Match:', self.compare(value, header, regex_expr=True))
             if not self.compare(value, header, regex_expr=True):
                 return False
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pook-1.0.2/pook/matchers/query.py 
new/pook-1.1.1/pook/matchers/query.py
--- old/pook-1.0.2/pook/matchers/query.py       2019-10-22 21:14:17.000000000 
+0200
+++ new/pook-1.1.1/pook/matchers/query.py       2023-01-01 17:33:51.000000000 
+0100
@@ -1,10 +1,6 @@
-import sys
 from .base import BaseMatcher
 
-if sys.version_info < (3,):     # Python 2
-    from urlparse import parse_qs
-else:                           # Python 3
-    from urllib.parse import parse_qs
+from urllib.parse import parse_qs
 
 
 class QueryMatcher(BaseMatcher):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pook-1.0.2/pook/matchers/url.py 
new/pook-1.1.1/pook/matchers/url.py
--- old/pook-1.0.2/pook/matchers/url.py 2019-10-22 21:14:17.000000000 +0200
+++ new/pook-1.1.1/pook/matchers/url.py 2023-01-01 17:33:51.000000000 +0100
@@ -1,14 +1,10 @@
 import re
-import sys
 from .base import BaseMatcher
 from .path import PathMatcher
 from .query import QueryMatcher
 from ..regex import isregex
 
-if sys.version_info < (3,):     # Python 2
-    from urlparse import urlparse
-else:                           # Python 3
-    from urllib.parse import urlparse
+from urllib.parse import urlparse
 
 # URI protocol test regular expression
 protoregex = re.compile('^http[s]?://', re.IGNORECASE)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pook-1.0.2/pook/request.py 
new/pook-1.1.1/pook/request.py
--- old/pook-1.0.2/pook/request.py      2019-10-22 21:14:17.000000000 +0200
+++ new/pook-1.1.1/pook/request.py      2023-01-01 17:33:51.000000000 +0100
@@ -1,4 +1,3 @@
-import sys
 import json as _json
 
 from .regex import isregex
@@ -6,10 +5,7 @@
 from .helpers import trigger_methods
 from .matchers.url import protoregex
 
-if sys.version_info < (3,):     # Python 2
-    from urlparse import urlparse, parse_qs, urlunparse
-else:                           # Python 3
-    from urllib.parse import urlparse, parse_qs, urlunparse
+from urllib.parse import urlparse, parse_qs, urlunparse
 
 
 class Request(object):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pook-1.0.2/pook.egg-info/PKG-INFO 
new/pook-1.1.1/pook.egg-info/PKG-INFO
--- old/pook-1.0.2/pook.egg-info/PKG-INFO       2021-09-10 16:38:20.000000000 
+0200
+++ new/pook-1.1.1/pook.egg-info/PKG-INFO       2023-01-12 16:54:45.000000000 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: pook
-Version: 1.0.2
+Version: 1.1.1
 Summary: HTTP traffic mocking and expectations made easy
 Home-page: https://github.com/h2non/pook
 Author: Tomas Aparicio
@@ -39,7 +39,7 @@
         -  Supports third-party mocking engines, such as `mocket`_.
         -  Fits good for painless test doubles.
         -  Does not support WebSocket traffic mocking.
-        -  Works with Python +2.7 and +3.0 (including PyPy).
+        -  Works with +3.5 (including PyPy).
         -  Dependency-less: just 2 small dependencies for JSONSchema and XML 
tree comparison.
         
         
@@ -335,6 +335,13 @@
         
         
         
+        v1.1.0 / 2023-01-01
+        ===================
+        
+          * chore(version): bump minor v1.1.0
+          * Switch to Python >= 3.5 and fix latest aiohttp compatability (#83)
+          * fix: remove print call (#81)
+        
         v1.0.2 / 2021-09-10
         ===================
         
@@ -525,11 +532,13 @@
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Natural Language :: English
 Classifier: License :: OSI Approved :: MIT License
-Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
+Classifier: Programming Language :: Python :: 3.10
+Classifier: Programming Language :: Python :: 3.11
 Classifier: Topic :: Software Development
 Classifier: Topic :: Software Development :: Libraries :: Python Modules
 Classifier: Programming Language :: Python :: Implementation :: CPython
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pook-1.0.2/pook.egg-info/SOURCES.txt 
new/pook-1.1.1/pook.egg-info/SOURCES.txt
--- old/pook-1.0.2/pook.egg-info/SOURCES.txt    2021-09-10 16:38:20.000000000 
+0200
+++ new/pook-1.1.1/pook.egg-info/SOURCES.txt    2023-01-12 16:54:45.000000000 
+0100
@@ -62,6 +62,7 @@
 tests/unit/mock_test.py
 tests/unit/regex_test.py
 tests/unit/interceptors/__init__.py
+tests/unit/interceptors/aiohttp_test.py
 tests/unit/interceptors/module_test.py
 tests/unit/interceptors/urllib3_test.py
 tests/unit/matchers/__init__.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pook-1.0.2/pook.egg-info/requires.txt 
new/pook-1.1.1/pook.egg-info/requires.txt
--- old/pook-1.0.2/pook.egg-info/requires.txt   2021-09-10 16:38:20.000000000 
+0200
+++ new/pook-1.1.1/pook.egg-info/requires.txt   2023-01-12 16:54:45.000000000 
+0100
@@ -1,6 +1,3 @@
 jsonschema>=2.5.1
 xmltodict>=0.11.0
 furl>=0.5.6
-
-[:python_version < "3.3"]
-mock>=2.0.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pook-1.0.2/requirements-dev.txt 
new/pook-1.1.1/requirements-dev.txt
--- old/pook-1.0.2/requirements-dev.txt 2020-03-19 00:12:59.000000000 +0100
+++ new/pook-1.1.1/requirements-dev.txt 2023-01-01 17:33:51.000000000 +0100
@@ -1,8 +1,8 @@
 flake8
 wheel>=0.29
 coveralls>=1.1
-pytest~=3.0.3
-pytest-cov~=2.3.1
+pytest~=7.2.0
+pytest-cov~=4.0.0
 pytest-flakes~=1.0.1
 nose~=1.3.7
 Sphinx~=1.4.8
@@ -10,5 +10,6 @@
 requests>=2.20.0
 urllib3>=1.24.2
 bumpversion~=0.5.3
-aiohttp~=3.6.2 ; python_version >= '3.5.0'
+aiohttp~=3.8.3
 mocket~=1.6.0
+pytest-asyncio~=0.20.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pook-1.0.2/requirements.txt 
new/pook-1.1.1/requirements.txt
--- old/pook-1.0.2/requirements.txt     2019-10-22 21:14:17.000000000 +0200
+++ new/pook-1.1.1/requirements.txt     2023-01-01 17:33:51.000000000 +0100
@@ -1,4 +1,3 @@
 jsonschema>=2.5.1
 xmltodict>=0.11.0
 furl>=0.5.6
-mock>=2.0.0 ; python_version < '3.3'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pook-1.0.2/setup.py new/pook-1.1.1/setup.py
--- old/pook-1.0.2/setup.py     2020-03-24 14:34:46.000000000 +0100
+++ new/pook-1.1.1/setup.py     2023-01-12 16:54:41.000000000 +0100
@@ -92,11 +92,13 @@
         'Development Status :: 5 - Production/Stable',
         'Natural Language :: English',
         'License :: OSI Approved :: MIT License',
-        'Programming Language :: Python :: 3',
         'Programming Language :: Python :: 3.5',
         'Programming Language :: Python :: 3.6',
         'Programming Language :: Python :: 3.7',
         'Programming Language :: Python :: 3.8',
+        'Programming Language :: Python :: 3.9',
+        'Programming Language :: Python :: 3.10',
+        'Programming Language :: Python :: 3.11',
         'Topic :: Software Development',
         'Topic :: Software Development :: Libraries :: Python Modules',
         'Programming Language :: Python :: Implementation :: CPython',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pook-1.0.2/tests/integration/engines_test.py 
new/pook-1.1.1/tests/integration/engines_test.py
--- old/pook-1.0.2/tests/integration/engines_test.py    2019-10-22 
21:14:17.000000000 +0200
+++ new/pook-1.1.1/tests/integration/engines_test.py    2023-01-01 
17:33:51.000000000 +0100
@@ -5,7 +5,7 @@
 # List of engine specific test commands to run
 engine_tests = (
     'py.test tests/integration/engines/pytest_suite.py',
-    'nosetests tests/integration/engines/nose_suite.py',
+    # 'nosetests tests/integration/engines/nose_suite.py',
     'python -m unittest tests.integration.engines.unittest_suite',
 )
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pook-1.0.2/tests/unit/interceptors/aiohttp_test.py 
new/pook-1.1.1/tests/unit/interceptors/aiohttp_test.py
--- old/pook-1.0.2/tests/unit/interceptors/aiohttp_test.py      1970-01-01 
01:00:00.000000000 +0100
+++ new/pook-1.1.1/tests/unit/interceptors/aiohttp_test.py      2023-01-01 
17:33:51.000000000 +0100
@@ -0,0 +1,36 @@
+import aiohttp
+import pook
+import pytest
+
+
+pytestmark = pytest.mark.asyncio
+
+URL = "https://httpbin.org/status/404";
+
+
+def _pook_url():
+    return pook.head(URL).reply(200).mock
+
+
+async def test_async_with_request():
+    # Cannot use `@pook.on` with pytest marks
+    pook.on()
+    mock = _pook_url()
+    async with aiohttp.ClientSession() as session:
+        async with session.head(URL) as req:
+            assert req.status == 200
+    pook.off()
+
+    assert len(mock.matches) == 1
+
+
+async def test_await_request():
+    # Cannot use `@pook.on` with pytest marks
+    pook.on()
+    mock = _pook_url()
+    async with aiohttp.ClientSession() as session:
+        req = await session.head(URL)
+        assert req.status == 200
+    pook.off()
+
+    assert len(mock.matches) == 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pook-1.0.2/tests/unit/interceptors/urllib3_test.py 
new/pook-1.1.1/tests/unit/interceptors/urllib3_test.py
--- old/pook-1.0.2/tests/unit/interceptors/urllib3_test.py      2021-09-10 
16:31:11.000000000 +0200
+++ new/pook-1.1.1/tests/unit/interceptors/urllib3_test.py      2023-01-01 
17:33:51.000000000 +0100
@@ -15,7 +15,6 @@
 
     assert r.status == 204
 
-    # py2 returns decoded chunks, while py3 does not
     chunks = list(r.read_chunked())
     chunks = [c.decode() if isinstance(c, bytes) else c for c in chunks]
     assert chunks == expected
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pook-1.0.2/tests/unit/mock_test.py 
new/pook-1.1.1/tests/unit/mock_test.py
--- old/pook-1.0.2/tests/unit/mock_test.py      2019-10-22 21:14:17.000000000 
+0200
+++ new/pook-1.1.1/tests/unit/mock_test.py      2023-01-12 16:54:41.000000000 
+0100
@@ -19,4 +19,4 @@
 
 
 def test_new_response(mock):
-    assert(mock.reply() != mock.reply(new_response=True, json={}))
+    assert mock.reply() != mock.reply(new_response=True, json={})

Reply via email to