Hello community, here is the log from the commit of package python3-aiohttp for openSUSE:Factory checked in at 2016-02-16 09:19:09 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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-08 09:48:28.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.python3-aiohttp.new/python3-aiohttp.changes 2016-02-16 09:19:10.000000000 +0100 @@ -1,0 +2,8 @@ +Fri Feb 12 04:58:53 UTC 2016 - a...@gmx.de + +- update to version 0.21.1: + * Make new resources classes public #767 + * Add router.resources() view + * Fix cmd-line parameter names in doc + +------------------------------------------------------------------- Old: ---- aiohttp-0.21.0.tar.gz New: ---- aiohttp-0.21.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python3-aiohttp.spec ++++++ --- /var/tmp/diff_new_pack.vwfVgU/_old 2016-02-16 09:19:10.000000000 +0100 +++ /var/tmp/diff_new_pack.vwfVgU/_new 2016-02-16 09:19:10.000000000 +0100 @@ -17,7 +17,7 @@ Name: python3-aiohttp -Version: 0.21.0 +Version: 0.21.1 Release: 0 Url: https://pypi.python.org/pypi/aiohttp Summary: Http client/server for asyncio ++++++ aiohttp-0.21.0.tar.gz -> aiohttp-0.21.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.0/CHANGES.txt new/aiohttp-0.21.1/CHANGES.txt --- old/aiohttp-0.21.0/CHANGES.txt 2016-02-04 12:17:44.000000000 +0100 +++ new/aiohttp-0.21.1/CHANGES.txt 2016-02-10 19:40:11.000000000 +0100 @@ -1,6 +1,15 @@ CHANGES ======= +0.21.1 (02-10-2016) +------------------- + +- Make new resources classes public #767 + +- Add `router.resources()` view + +- Fix cmd-line parameter names in doc + 0.21.0 (02-04-2016) -------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.0/Makefile new/aiohttp-0.21.1/Makefile --- old/aiohttp-0.21.0/Makefile 2016-02-04 12:17:44.000000000 +0100 +++ new/aiohttp-0.21.1/Makefile 2016-02-10 19:40:11.000000000 +0100 @@ -54,6 +54,10 @@ rm -f aiohttp/_multidict.c rm -f aiohttp/_multidict.*.so rm -f aiohttp/_multidict.*.pyd + rm -f aiohttp/_websocket.html + rm -f aiohttp/_websocket.c + rm -f aiohttp/_websocket.*.so + rm -f aiohttp/_websocket.*.pyd rm -rf .tox doc: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.0/PKG-INFO new/aiohttp-0.21.1/PKG-INFO --- old/aiohttp-0.21.0/PKG-INFO 2016-02-04 12:19:18.000000000 +0100 +++ new/aiohttp-0.21.1/PKG-INFO 2016-02-10 19:41:21.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: aiohttp -Version: 0.21.0 +Version: 0.21.1 Summary: http client/server for asyncio Home-page: https://github.com/KeepSafe/aiohttp/ Author: Andrew Svetlov @@ -150,6 +150,15 @@ CHANGES ======= + 0.21.1 (02-10-2016) + ------------------- + + - Make new resources classes public #767 + + - Add `router.resources()` view + + - Fix cmd-line parameter names in doc + 0.21.0 (02-04-2016) -------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.0/aiohttp/__init__.py new/aiohttp-0.21.1/aiohttp/__init__.py --- old/aiohttp-0.21.0/aiohttp/__init__.py 2016-02-04 12:17:44.000000000 +0100 +++ new/aiohttp-0.21.1/aiohttp/__init__.py 2016-02-10 19:40:11.000000000 +0100 @@ -1,6 +1,6 @@ # This relies on each of the submodules having an __all__ variable. -__version__ = '0.21.0' +__version__ = '0.21.1' from . import hdrs # noqa diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.0/aiohttp/web_urldispatcher.py new/aiohttp-0.21.1/aiohttp/web_urldispatcher.py --- old/aiohttp-0.21.0/aiohttp/web_urldispatcher.py 2016-02-04 12:17:44.000000000 +0100 +++ new/aiohttp-0.21.1/aiohttp/web_urldispatcher.py 2016-02-10 19:40:11.000000000 +0100 @@ -25,7 +25,9 @@ __all__ = ('UrlDispatcher', 'UrlMappingMatchInfo', - 'Resource', 'PlainResource', 'DynamicResource', + 'AbstractResource', 'Resource', 'PlainResource', 'DynamicResource', + 'ResourceAdapter', + 'AbstractRoute', 'ResourceRoute', 'Route', 'PlainRoute', 'DynamicRoute', 'StaticRoute', 'View') @@ -654,6 +656,21 @@ raise HTTPMethodNotAllowed(self.request.method, allowed_methods) +class ResourcesView(Sized, Iterable, Container): + + def __init__(self, resources): + self._resources = resources + + def __len__(self): + return len(self._resources) + + def __iter__(self): + yield from self._resources + + def __contains__(self, resource): + return resource in self._resources + + class RoutesView(Sized, Iterable, Container): def __init__(self, resources): @@ -717,6 +734,9 @@ def __getitem__(self, name): return self._named_resources[name] + def resources(self): + return ResourcesView(self._resources) + def routes(self): return RoutesView(self._resources) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.0/aiohttp.egg-info/PKG-INFO new/aiohttp-0.21.1/aiohttp.egg-info/PKG-INFO --- old/aiohttp-0.21.0/aiohttp.egg-info/PKG-INFO 2016-02-04 12:19:18.000000000 +0100 +++ new/aiohttp-0.21.1/aiohttp.egg-info/PKG-INFO 2016-02-10 19:41:21.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: aiohttp -Version: 0.21.0 +Version: 0.21.1 Summary: http client/server for asyncio Home-page: https://github.com/KeepSafe/aiohttp/ Author: Andrew Svetlov @@ -150,6 +150,15 @@ CHANGES ======= + 0.21.1 (02-10-2016) + ------------------- + + - Make new resources classes public #767 + + - Add `router.resources()` view + + - Fix cmd-line parameter names in doc + 0.21.0 (02-04-2016) -------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.0/docs/conf.py new/aiohttp-0.21.1/docs/conf.py --- old/aiohttp-0.21.0/docs/conf.py 2016-02-04 12:17:44.000000000 +0100 +++ new/aiohttp-0.21.1/docs/conf.py 2016-02-10 19:40:11.000000000 +0100 @@ -124,7 +124,7 @@ pygments_style = 'sphinx' # The default language to highlight source code in. -highlight_language = 'python' +highlight_language = 'python3' # A list of ignored prefixes for module index sorting. # modindex_common_prefix = [] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.0/docs/glossary.rst new/aiohttp-0.21.1/docs/glossary.rst --- old/aiohttp-0.21.0/docs/glossary.rst 2016-02-04 12:17:44.000000000 +0100 +++ new/aiohttp-0.21.1/docs/glossary.rst 2016-02-10 19:40:11.000000000 +0100 @@ -41,7 +41,7 @@ keep-alive A technique for communicating between HTTP client and server - when connection is not closed after sending response but keeped + when connection is not closed after sending response but kept open for sending next request through the same socket. It makes communication faster by getting rid of connection @@ -49,7 +49,7 @@ resource - A concept reflects the HTTP **path**, every resource corresponsd + A concept reflects the HTTP **path**, every resource corresponds to *URI*. May have an unique name. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.0/docs/logging.rst new/aiohttp-0.21.1/docs/logging.rst --- old/aiohttp-0.21.0/docs/logging.rst 2016-02-04 12:17:44.000000000 +0100 +++ new/aiohttp-0.21.1/docs/logging.rst 2016-02-10 19:40:11.000000000 +0100 @@ -11,6 +11,7 @@ We have the following loggers enumerated by names: +- ``'aiohttp.access'`` - ``'aiohttp.client'`` - ``'aiohttp.internal'`` - ``'aiohttp.server'`` @@ -27,16 +28,24 @@ Access logs ----------- -Access log is enabled by specifying *access_log* parameter -(:class:`logging.Logger` instance) on -:meth:`aiohttp.web.Application.make_handler` call. +Access log by default is switched on and uses ``'aiohttp.access'`` +logger name. -Optional *access_log_format* parameter may be used for specifying log -format (see below). +The log may be controlled by :meth:`aiohttp.web.Application.make_handler` call. + +Pass *access_log* parameter with value of :class:`logging.Logger` +instance to override default logger. + +.. note:: -.. note:: Access log is disabled by default. + Use ``app.make_handler(access_log=None)`` for disabling access logs. + + +Other parameter called *access_log_format* may be used for specifying log +format (see below). -Format specification. +Format specification +^^^^^^^^^^^^^^^^^^^^ The library provides custom micro-language to specifying info about request and response: @@ -86,7 +95,7 @@ *aiohttp.web* uses logger named ``'aiohttp.server'`` to store errors given on web requests handling. -The log is always enabled. +The log is enabled by default. To use different logger name please specify *logger* parameter (:class:`logging.Logger` instance) on performing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.0/docs/new_router.rst new/aiohttp-0.21.1/docs/new_router.rst --- old/aiohttp-0.21.0/docs/new_router.rst 2016-02-04 12:17:44.000000000 +0100 +++ new/aiohttp-0.21.1/docs/new_router.rst 2016-02-10 19:40:11.000000000 +0100 @@ -77,7 +77,7 @@ shortcut for:: resource = app.router.add_resource(path, name=name) - route = resource.add_route(methoc, handler) + route = resource.add_route(method, handler) return route ``app.router.register_route(...)`` is still supported, it creates diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.0/docs/web.rst new/aiohttp-0.21.1/docs/web.rst --- old/aiohttp-0.21.0/docs/web.rst 2016-02-04 12:17:44.000000000 +0100 +++ new/aiohttp-0.21.1/docs/web.rst 2016-02-10 19:40:11.000000000 +0100 @@ -52,7 +52,7 @@ :mod:`aiohttp.web` implements a basic CLI for quickly serving an :class:`Application` in *development* over TCP/IP:: - $ python -m aiohttp.web -n localhost -p 8080 package.module.init_func + $ python -m aiohttp.web -H localhost -P 8080 package.module.init_func ``package.module.init_func`` should be an importable :term:`callable` that accepts a list of any non-parsed command-line arguments and returns an @@ -261,7 +261,7 @@ Resource Views ^^^^^^^^^^^^^^ -*All* registered ressources in a router can be viewed using the +*All* registered resources in a router can be viewed using the :meth:`UrlDispatcher.resources` method:: for resource in app.router.resources(): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.0/docs/web_abc.rst new/aiohttp-0.21.1/docs/web_abc.rst --- old/aiohttp-0.21.0/docs/web_abc.rst 2016-02-04 12:17:44.000000000 +0100 +++ new/aiohttp-0.21.1/docs/web_abc.rst 2016-02-10 19:40:11.000000000 +0100 @@ -44,7 +44,7 @@ .. coroutinemethod:: resolve(request) Performs URL resolving. It's an abstract method, should be - overriden in *router* implementation. + overridden in *router* implementation. :param request: :class:`aiohttp.web.Request` instance for resolving, the request has @@ -71,7 +71,7 @@ resolving, the request has :attr:`aiohttp.web.Request.match_info` equals to ``None`` at resolving stage. - :return: :class:`aiohttp.web.StramResponse` or descenants. + :return: :class:`aiohttp.web.StramResponse` or descendants. :raise: :class:`aiohttp.web.HTTPException` on error diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.0/docs/web_reference.rst new/aiohttp-0.21.1/docs/web_reference.rst --- old/aiohttp-0.21.0/docs/web_reference.rst 2016-02-04 12:17:44.000000000 +0100 +++ new/aiohttp-0.21.1/docs/web_reference.rst 2016-02-10 19:40:11.000000000 +0100 @@ -1301,24 +1301,30 @@ The method don't raise :exc:`HTTPNotFound` and :exc:`HTTPMethodNotAllowed` anymore. - .. method:: routes() + .. method:: resources() - The method returns a *view* for *all* registered routes. + The method returns a *view* for *all* registered resources. The view is an object that allows to: 1. Get size of the router table:: - len(app.router.routes()) + len(app.router.resources()) + + 2. Iterate over registered resources:: + + for resource in app.router.resources(): + print(resource) - 2. Iterate over registered routes:: + 3. Make a check if the resources is registered in the router table:: - for route in app.router.routes(): - print(route) + route in app.router.resources() - 3. Make a check if the route is registered in the router table:: + .. versionadded:: 0.21.1 - route in app.router.routes() + .. method:: routes() + + The method returns a *view* for *all* registered routes. .. versionadded:: 0.18 @@ -1341,6 +1347,8 @@ app.router.named_resources()["name"] + .. versionadded:: 0.21 + .. method:: named_routes() An alias for :meth:`named_resources` starting from aiohttp 0.21. @@ -1753,7 +1761,7 @@ ``None`` for HTTP connection. :param print: a callable compatible with :func:`print`. May be used - to override stdout output or suppress it. + to override STDOUT output or suppress it. Constants diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.0/setup.cfg new/aiohttp-0.21.1/setup.cfg --- old/aiohttp-0.21.0/setup.cfg 2016-02-04 12:19:18.000000000 +0100 +++ new/aiohttp-0.21.1/setup.cfg 2016-02-10 19:41:21.000000000 +0100 @@ -5,7 +5,7 @@ ignore = N801,N802,N803,E226 [egg_info] -tag_svn_revision = 0 tag_build = tag_date = 0 +tag_svn_revision = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.0/tests/test_urldispatch.py new/aiohttp-0.21.1/tests/test_urldispatch.py --- old/aiohttp-0.21.0/tests/test_urldispatch.py 2016-02-04 12:17:44.000000000 +0100 +++ new/aiohttp-0.21.1/tests/test_urldispatch.py 2016-02-10 19:40:11.000000000 +0100 @@ -851,3 +851,26 @@ req = self.make_request('GET', '/abc') info = self.loop.run_until_complete(self.router.resolve(req)) self.assertEqual(info.get_info()['http_exception'].status, 404) + + def fill_resources(self): + resource1 = self.router.add_resource('/plain') + resource2 = self.router.add_resource('/variable/{name}') + return resource1, resource2 + + def test_resources_view_len(self): + self.fill_resources() + self.assertEqual(2, len(self.router.resources())) + + def test_resources_view_iter(self): + resources = self.fill_resources() + self.assertEqual(list(resources), list(self.router.resources())) + + def test_resources_view_contains(self): + resources = self.fill_resources() + for resource in resources: + self.assertIn(resource, self.router.resources()) + + def test_resources_abc(self): + self.assertIsInstance(self.router.resources(), Sized) + self.assertIsInstance(self.router.resources(), Iterable) + self.assertIsInstance(self.router.resources(), Container)