Hello community, here is the log from the commit of package python3-aiohttp for openSUSE:Factory checked in at 2016-03-17 16:35:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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-02-17 12:23:29.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.python3-aiohttp.new/python3-aiohttp.changes 2016-03-17 16:48:21.000000000 +0100 @@ -1,0 +2,12 @@ +Tue Mar 15 04:46:48 UTC 2016 - [email protected] + +- update to version 0.21.4: + * Fix ResourceAdapter: dont add method to allowed if resource is not + match #826 + * Fix Resouce: append found method to returned allowed methods + +- changes from version 0.21.2: + * Fix a regression: support for handling ~/path in static file + routes was broken #782 + +------------------------------------------------------------------- Old: ---- aiohttp-0.21.2.tar.gz New: ---- aiohttp-0.21.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python3-aiohttp.spec ++++++ --- /var/tmp/diff_new_pack.TKofhx/_old 2016-03-17 16:48:22.000000000 +0100 +++ /var/tmp/diff_new_pack.TKofhx/_new 2016-03-17 16:48:22.000000000 +0100 @@ -17,7 +17,7 @@ Name: python3-aiohttp -Version: 0.21.2 +Version: 0.21.4 Release: 0 Url: https://pypi.python.org/pypi/aiohttp Summary: Http client/server for asyncio ++++++ aiohttp-0.21.2.tar.gz -> aiohttp-0.21.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.2/CHANGES.txt new/aiohttp-0.21.4/CHANGES.txt --- old/aiohttp-0.21.2/CHANGES.txt 2016-02-16 15:57:34.000000000 +0100 +++ new/aiohttp-0.21.4/CHANGES.txt 2016-03-13 12:17:25.000000000 +0100 @@ -1,6 +1,14 @@ CHANGES ======= +0.21.4 (03-12-2016) +------------------- + +- Fix ResourceAdapter: dont add method to allowed if resource is not + match #826 + +- Fix Resouce: append found method to returned allowed methods + 0.21.2 (02-16-2016) ------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.2/PKG-INFO new/aiohttp-0.21.4/PKG-INFO --- old/aiohttp-0.21.2/PKG-INFO 2016-02-16 15:59:18.000000000 +0100 +++ new/aiohttp-0.21.4/PKG-INFO 2016-03-13 12:18:42.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: aiohttp -Version: 0.21.2 +Version: 0.21.4 Summary: http client/server for asyncio Home-page: https://github.com/KeepSafe/aiohttp/ Author: Andrew Svetlov @@ -150,6 +150,14 @@ CHANGES ======= + 0.21.4 (03-12-2016) + ------------------- + + - Fix ResourceAdapter: dont add method to allowed if resource is not + match #826 + + - Fix Resouce: append found method to returned allowed methods + 0.21.2 (02-16-2016) ------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.2/aiohttp/__init__.py new/aiohttp-0.21.4/aiohttp/__init__.py --- old/aiohttp-0.21.2/aiohttp/__init__.py 2016-02-16 15:57:34.000000000 +0100 +++ new/aiohttp-0.21.4/aiohttp/__init__.py 2016-03-13 12:17:25.000000000 +0100 @@ -1,6 +1,6 @@ # This relies on each of the submodules having an __all__ variable. -__version__ = '0.21.2' +__version__ = '0.21.4' from . import hdrs # noqa @@ -17,15 +17,15 @@ from .websocket_client import * # noqa -__all__ = (client.__all__ + - client_reqrep.__all__ + - errors.__all__ + - helpers.__all__ + - parsers.__all__ + - protocol.__all__ + - connector.__all__ + - streams.__all__ + - multidict.__all__ + - multipart.__all__ + - websocket_client.__all__ + +__all__ = (client.__all__ + # noqa + client_reqrep.__all__ + # noqa + errors.__all__ + # noqa + helpers.__all__ + # noqa + parsers.__all__ + # noqa + protocol.__all__ + # noqa + connector.__all__ + # noqa + streams.__all__ + # noqa + multidict.__all__ + # noqa + multipart.__all__ + # noqa + websocket_client.__all__ + # noqa ('hdrs', '__version__')) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.2/aiohttp/web.py new/aiohttp-0.21.4/aiohttp/web.py --- old/aiohttp-0.21.2/aiohttp/web.py 2016-02-16 15:57:34.000000000 +0100 +++ new/aiohttp-0.21.4/aiohttp/web.py 2016-03-13 12:17:25.000000000 +0100 @@ -65,7 +65,7 @@ now = self._loop.time() app = self._app - request = Request( + request = web_reqrep.Request( app, message, payload, self.transport, self.reader, self.writer, secure_proxy_ssl_header=self._secure_proxy_ssl_header) @@ -89,11 +89,11 @@ handler = yield from factory(app, handler) resp = yield from handler(request) - assert isinstance(resp, StreamResponse), \ + assert isinstance(resp, web_reqrep.StreamResponse), \ ("Handler {!r} should return response instance, " "got {!r} [middlewares {!r}]").format( match_info.handler, type(resp), self._middlewares) - except HTTPException as exc: + except web_exceptions.HTTPException as exc: resp = exc resp_msg = yield from resp.prepare(request) @@ -193,7 +193,7 @@ if loop is None: loop = asyncio.get_event_loop() if router is None: - router = UrlDispatcher() + router = web_urldispatcher.UrlDispatcher() assert isinstance(router, AbstractRouter), router self._debug = debug diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.2/aiohttp/web_urldispatcher.py new/aiohttp-0.21.4/aiohttp/web_urldispatcher.py --- old/aiohttp-0.21.2/aiohttp/web_urldispatcher.py 2016-02-16 15:57:34.000000000 +0100 +++ new/aiohttp-0.21.4/aiohttp/web_urldispatcher.py 2016-03-13 12:17:25.000000000 +0100 @@ -204,10 +204,11 @@ @asyncio.coroutine def resolve(self, method, path): route_method = self._route.method - allowed_methods = {route_method} - if route_method == method or route_method == hdrs.METH_ANY: - match_dict = self._route.match(path) - if match_dict is not None: + allowed_methods = set() + match_dict = self._route.match(path) + if match_dict is not None: + allowed_methods.add(route_method) + if route_method == hdrs.METH_ANY or route_method == method: return (UrlMappingMatchInfo(match_dict, self._route), allowed_methods) return None, allowed_methods @@ -257,11 +258,10 @@ for route in self._routes: route_method = route.method + allowed_methods.add(route_method) if route_method == method or route_method == hdrs.METH_ANY: return UrlMappingMatchInfo(match_dict, route), allowed_methods - - allowed_methods.add(route_method) else: return None, allowed_methods diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.2/aiohttp.egg-info/PKG-INFO new/aiohttp-0.21.4/aiohttp.egg-info/PKG-INFO --- old/aiohttp-0.21.2/aiohttp.egg-info/PKG-INFO 2016-02-16 15:59:17.000000000 +0100 +++ new/aiohttp-0.21.4/aiohttp.egg-info/PKG-INFO 2016-03-13 12:18:42.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: aiohttp -Version: 0.21.2 +Version: 0.21.4 Summary: http client/server for asyncio Home-page: https://github.com/KeepSafe/aiohttp/ Author: Andrew Svetlov @@ -150,6 +150,14 @@ CHANGES ======= + 0.21.4 (03-12-2016) + ------------------- + + - Fix ResourceAdapter: dont add method to allowed if resource is not + match #826 + + - Fix Resouce: append found method to returned allowed methods + 0.21.2 (02-16-2016) ------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.2/docs/conf.py new/aiohttp-0.21.4/docs/conf.py --- old/aiohttp-0.21.2/docs/conf.py 2016-02-16 15:57:34.000000000 +0100 +++ new/aiohttp-0.21.4/docs/conf.py 2016-03-13 12:17:25.000000000 +0100 @@ -55,10 +55,17 @@ 'sphinx.ext.intersphinx', 'alabaster', 'aiohttp_doctools', - 'sphinxcontrib.spelling', 'sphinxcontrib.newsfeed', ] + +try: + import sphinxcontrib.spelling # noqa + extensions.append('sphinxcontrib.spelling') +except ImportError: + pass + + intersphinx_mapping = { 'python': ('http://docs.python.org/3', None), 'aiohttpjinja2': diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.2/docs/faq.rst new/aiohttp-0.21.4/docs/faq.rst --- old/aiohttp-0.21.2/docs/faq.rst 2016-02-16 15:57:34.000000000 +0100 +++ new/aiohttp-0.21.4/docs/faq.rst 2016-03-13 12:17:25.000000000 +0100 @@ -44,7 +44,7 @@ async def init_app(loop): app = Application(loop=loop) - db = await crate_connection(user='user', password='123') + db = await create_connection(user='user', password='123') app['db'] = db app.router.add_route('GET', '/', go) return app @@ -76,7 +76,7 @@ Just put data inside *request*:: async def handler(request): - requset['unique_key'] = data + request['unique_key'] = data See https://github.com/aio-libs/aiohttp_session code for inspiration, ``aiohttp_session.get_session(request)`` method uses ``SESSION_KEY`` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.2/setup.cfg new/aiohttp-0.21.4/setup.cfg --- old/aiohttp-0.21.2/setup.cfg 2016-02-16 15:59:18.000000000 +0100 +++ new/aiohttp-0.21.4/setup.cfg 2016-03-13 12:18:42.000000000 +0100 @@ -5,7 +5,7 @@ ignore = N801,N802,N803,E226 [egg_info] -tag_date = 0 -tag_build = tag_svn_revision = 0 +tag_build = +tag_date = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.2/tests/test_urldispatch.py new/aiohttp-0.21.4/tests/test_urldispatch.py --- old/aiohttp-0.21.2/tests/test_urldispatch.py 2016-02-16 15:57:34.000000000 +0100 +++ new/aiohttp-0.21.4/tests/test_urldispatch.py 2016-03-13 12:17:25.000000000 +0100 @@ -697,7 +697,7 @@ route = PlainRoute('GET', lambda req: None, None, '/path') self.router.register_route(route) resource = route.resource - self.assertEqual((None, {'GET'}), + self.assertEqual((None, set()), self.loop.run_until_complete( resource.resolve('GET', '/another/path'))) @@ -888,3 +888,27 @@ here = pathlib.Path(aiohttp.__file__).parent / '__init__.py' with self.assertRaises(ValueError): self.router.add_static('/st', here) + + def test_404_for_resource_adapter(self): + route = self.router.add_static('/st', + os.path.dirname(aiohttp.__file__)) + resource = route.resource + ret = self.loop.run_until_complete( + resource.resolve('GET', '/unknown/path')) + self.assertEqual((None, set()), ret) + + def test_405_for_resource_adapter(self): + route = self.router.add_static('/st', + os.path.dirname(aiohttp.__file__)) + resource = route.resource + ret = self.loop.run_until_complete( + resource.resolve('POST', '/st/abc.py')) + self.assertEqual((None, {'GET'}), ret) + + def test_check_allowed_method_for_found_resource(self): + handler = self.make_handler() + resource = self.router.add_resource('/') + resource.add_route('GET', handler) + ret = self.loop.run_until_complete(resource.resolve('GET', '/')) + self.assertIsNotNone(ret[0]) + self.assertEqual({'GET'}, ret[1])
