commit python3-aiohttp for openSUSE:Factory
Hello community, here is the log from the commit of package python3-aiohttp for openSUSE:Factory checked in at 2016-07-28 23:46:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python3-aiohttp (Old) and /work/SRC/openSUSE:Factory/.python3-aiohttp.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python3-aiohttp" Changes: -------- --- /work/SRC/openSUSE:Factory/python3-aiohttp/python3-aiohttp.changes 2016-07-18 21:25:40.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python3-aiohttp.new/python3-aiohttp.changes 2016-07-28 23:46:25.000000000 +0200 @@ -1,0 +2,10 @@ +Sat Jul 23 17:28:04 UTC 2016 - arun@gmx.de + +- update to version 0.22.2: + * Suppress CancelledError when Timeout raises TimeoutError #970 + * Don’t expose aiohttp.__version__ + * Add unsafe parameter to CookieJar #968 + * Use unsafe cookie jar in test client tools + * Expose aiohttp.CookieJar name + +------------------------------------------------------------------- Old: ---- aiohttp-0.22.1.tar.gz New: ---- aiohttp-0.22.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python3-aiohttp.spec ++++++ --- /var/tmp/diff_new_pack.y263mf/_old 2016-07-28 23:46:26.000000000 +0200 +++ /var/tmp/diff_new_pack.y263mf/_new 2016-07-28 23:46:26.000000000 +0200 @@ -17,7 +17,7 @@ Name: python3-aiohttp -Version: 0.22.1 +Version: 0.22.2 Release: 0 Url: https://pypi.python.org/pypi/aiohttp Summary: Http client/server for asyncio ++++++ aiohttp-0.22.1.tar.gz -> aiohttp-0.22.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.22.1/CHANGES.txt new/aiohttp-0.22.2/CHANGES.txt --- old/aiohttp-0.22.1/CHANGES.txt 2016-07-16 13:35:59.000000000 +0200 +++ new/aiohttp-0.22.2/CHANGES.txt 2016-07-23 15:31:40.000000000 +0200 @@ -1,14 +1,28 @@ CHANGES ======= -0.22.1 (08-16-2016) +0.22.2 (07-23-2016) +------------------- + +- Suppress CancelledError when Timeout raises TimeoutError #970 + +- Don't expose `aiohttp.__version__` + +- Add unsafe parameter to CookieJar #968 + +- Use unsafe cookie jar in test client tools + +- Expose aiohttp.CookieJar name + + +0.22.1 (07-16-2016) ------------------- - Large cookie expiration/max-age doesn't break an event loop from now (fixes #967) -0.22.0 (08-15-2016) +0.22.0 (07-15-2016) ------------------- - Fix bug in serving static directory #803 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.22.1/PKG-INFO new/aiohttp-0.22.2/PKG-INFO --- old/aiohttp-0.22.1/PKG-INFO 2016-07-16 13:37:29.000000000 +0200 +++ new/aiohttp-0.22.2/PKG-INFO 2016-07-23 15:33:07.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: aiohttp -Version: 0.22.1 +Version: 0.22.2 Summary: http client/server for asyncio Home-page: https://github.com/KeepSafe/aiohttp/ Author: Andrew Svetlov @@ -150,14 +150,28 @@ CHANGES ======= - 0.22.1 (08-16-2016) + 0.22.2 (07-23-2016) + ------------------- + + - Suppress CancelledError when Timeout raises TimeoutError #970 + + - Don't expose `aiohttp.__version__` + + - Add unsafe parameter to CookieJar #968 + + - Use unsafe cookie jar in test client tools + + - Expose aiohttp.CookieJar name + + + 0.22.1 (07-16-2016) ------------------- - Large cookie expiration/max-age doesn't break an event loop from now (fixes #967) - 0.22.0 (08-15-2016) + 0.22.0 (07-15-2016) ------------------- - Fix bug in serving static directory #803 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.22.1/aiohttp/__init__.py new/aiohttp-0.22.2/aiohttp/__init__.py --- old/aiohttp-0.22.1/aiohttp/__init__.py 2016-07-16 13:35:59.000000000 +0200 +++ new/aiohttp-0.22.2/aiohttp/__init__.py 2016-07-23 15:31:40.000000000 +0200 @@ -1,6 +1,6 @@ # This relies on each of the submodules having an __all__ variable. -__version__ = '0.22.1' +__version__ = '0.22.2' import multidict # noqa @@ -30,4 +30,4 @@ multidict.__all__ + # noqa multipart.__all__ + # noqa websocket_client.__all__ + # noqa - ('hdrs', '__version__', 'FileSender')) + ('hdrs', 'FileSender')) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.22.1/aiohttp/client.py new/aiohttp-0.22.2/aiohttp/client.py --- old/aiohttp-0.22.1/aiohttp/client.py 2016-07-16 13:35:59.000000000 +0200 +++ new/aiohttp-0.22.2/aiohttp/client.py 2016-07-23 15:31:40.000000000 +0200 @@ -152,8 +152,7 @@ redirects = 0 history = [] - if not isinstance(method, upstr): - method = upstr(method) + method = upstr(method) # Merge with default headers and transform to CIMultiDict headers = self._prepare_headers(headers) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.22.1/aiohttp/helpers.py new/aiohttp-0.22.2/aiohttp/helpers.py --- old/aiohttp-0.22.1/aiohttp/helpers.py 2016-07-16 13:35:59.000000000 +0200 +++ new/aiohttp-0.22.2/aiohttp/helpers.py 2016-07-23 15:31:40.000000000 +0200 @@ -27,7 +27,7 @@ __all__ = ('BasicAuth', 'create_future', 'FormData', 'parse_mimetype', - 'Timeout') + 'Timeout', 'CookieJar') class BasicAuth(namedtuple('BasicAuth', ['login', 'password', 'encoding'])): @@ -561,7 +561,7 @@ if exc_type is asyncio.CancelledError and self._cancelled: self._cancel_handler = None self._task = None - raise asyncio.TimeoutError + raise asyncio.TimeoutError from None if self._timeout is not None: self._cancel_handler.cancel() self._cancel_handler = None @@ -587,9 +587,10 @@ DATE_YEAR_RE = re.compile("(\d{2,4})") - def __init__(self, *, loop=None): + def __init__(self, *, unsafe=False, loop=None): super().__init__(loop=loop) self._host_only_cookies = set() + self._unsafe = unsafe def _expire_cookie(self, when, name, DAY=24*3600): now = self._loop.time() @@ -608,7 +609,7 @@ url_parsed = urlsplit(response_url or "") hostname = url_parsed.hostname - if is_ip_address(hostname): + if not self._unsafe and is_ip_address(hostname): # Don't accept cookies from IPs return diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.22.1/aiohttp/test_utils.py new/aiohttp-0.22.2/aiohttp/test_utils.py --- old/aiohttp-0.22.1/aiohttp/test_utils.py 2016-07-16 13:35:59.000000000 +0200 +++ new/aiohttp-0.22.2/aiohttp/test_utils.py 2016-07-23 15:31:40.000000000 +0200 @@ -349,7 +349,10 @@ self._server = None if not loop.is_running(): loop.run_until_complete(self.start_server()) - self._session = ClientSession(loop=self._loop) + self._session = ClientSession( + loop=self._loop, + cookie_jar=aiohttp.CookieJar(unsafe=True, + loop=self._loop)) self._root = '{}://{}:{}'.format(protocol, self._address, self.port) self._closed = False diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.22.1/aiohttp.egg-info/PKG-INFO new/aiohttp-0.22.2/aiohttp.egg-info/PKG-INFO --- old/aiohttp-0.22.1/aiohttp.egg-info/PKG-INFO 2016-07-16 13:37:28.000000000 +0200 +++ new/aiohttp-0.22.2/aiohttp.egg-info/PKG-INFO 2016-07-23 15:33:06.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: aiohttp -Version: 0.22.1 +Version: 0.22.2 Summary: http client/server for asyncio Home-page: https://github.com/KeepSafe/aiohttp/ Author: Andrew Svetlov @@ -150,14 +150,28 @@ CHANGES ======= - 0.22.1 (08-16-2016) + 0.22.2 (07-23-2016) + ------------------- + + - Suppress CancelledError when Timeout raises TimeoutError #970 + + - Don't expose `aiohttp.__version__` + + - Add unsafe parameter to CookieJar #968 + + - Use unsafe cookie jar in test client tools + + - Expose aiohttp.CookieJar name + + + 0.22.1 (07-16-2016) ------------------- - Large cookie expiration/max-age doesn't break an event loop from now (fixes #967) - 0.22.0 (08-15-2016) + 0.22.0 (07-15-2016) ------------------- - Fix bug in serving static directory #803 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.22.1/docs/client.rst new/aiohttp-0.22.2/docs/client.rst --- old/aiohttp-0.22.1/docs/client.rst 2016-07-16 13:35:59.000000000 +0200 +++ new/aiohttp-0.22.2/docs/client.rst 2016-07-23 15:31:40.000000000 +0200 @@ -386,6 +386,24 @@ :class:`~aiohttp.ClientSession` supports keep-alive requests and connection pooling out-of-the-box. +.. _aiohttp-client-cookie-safety: + +Cookie safety +------------- + +By default :class:`~aiohttp.ClientSession` uses strict version of +:class:`~aiohttp.CookieJar`. :rfc:`2109` explicitly forbids cookie +accepting from URLs with IP address instead of DNS name +(e.g. `http://127.0.0.1:80/cookie`). + +It's good but sometimes for testing we need to enable support for such +cookies. It should be done by passing `usafe=True` to +:class:`~aiohttp.CookieJar` constructor:: + + + jar = aiohttp.CookieJar(unsafe=True) + session = aiohttp.ClientSession(cookie_jar=jar) + Connectors ---------- @@ -421,8 +439,8 @@ aiodns is required. from aiohttp.resolver import AsyncResolver - - + + resolver = AsyncResolver(nameservers=["8.8.8.8", "8.8.4.4"]) conn = aiohttp.TCPConnector(resolver=resolver) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.22.1/tests/test_timeout.py new/aiohttp-0.22.2/tests/test_timeout.py --- old/aiohttp-0.22.1/tests/test_timeout.py 2016-07-16 13:35:59.000000000 +0200 +++ new/aiohttp-0.22.2/tests/test_timeout.py 2016-07-23 15:31:40.000000000 +0200 @@ -165,3 +165,13 @@ yield from task assert task.cancelled() assert task.done() + + +@pytest.mark.run_loop +def test_timeout_suppress_exception_chain(loop): + + with pytest.raises(asyncio.TimeoutError) as ctx: + with Timeout(0.01, loop=loop) as t: + yield from asyncio.sleep(10, loop=loop) + assert t._loop is loop + assert ctx.value.__suppress_context__
participants (1)
-
root@hilbert.suse.de