Hello community, here is the log from the commit of package python3-aiohttp for openSUSE:Factory checked in at 2016-02-17 10:26:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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-16 09:19:10.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.python3-aiohttp.new/python3-aiohttp.changes 2016-02-17 12:23:29.000000000 +0100 @@ -1,0 +2,7 @@ +Wed Feb 17 03:52:44 UTC 2016 - a...@gmx.de + +- update to version 0.21.2: + * Fix a regression: support for handling ~/path in static file + routes was broken #782 + +------------------------------------------------------------------- Old: ---- aiohttp-0.21.1.tar.gz New: ---- aiohttp-0.21.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python3-aiohttp.spec ++++++ --- /var/tmp/diff_new_pack.CjIlk8/_old 2016-02-17 12:23:30.000000000 +0100 +++ /var/tmp/diff_new_pack.CjIlk8/_new 2016-02-17 12:23:30.000000000 +0100 @@ -17,7 +17,7 @@ Name: python3-aiohttp -Version: 0.21.1 +Version: 0.21.2 Release: 0 Url: https://pypi.python.org/pypi/aiohttp Summary: Http client/server for asyncio ++++++ aiohttp-0.21.1.tar.gz -> aiohttp-0.21.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.1/CHANGES.txt new/aiohttp-0.21.2/CHANGES.txt --- old/aiohttp-0.21.1/CHANGES.txt 2016-02-10 19:40:11.000000000 +0100 +++ new/aiohttp-0.21.2/CHANGES.txt 2016-02-16 15:57:34.000000000 +0100 @@ -1,6 +1,12 @@ CHANGES ======= +0.21.2 (02-16-2016) +------------------- + +- Fix a regression: support for handling ~/path in static file routes was + broken #782 + 0.21.1 (02-10-2016) ------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.1/PKG-INFO new/aiohttp-0.21.2/PKG-INFO --- old/aiohttp-0.21.1/PKG-INFO 2016-02-10 19:41:21.000000000 +0100 +++ new/aiohttp-0.21.2/PKG-INFO 2016-02-16 15:59:18.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: aiohttp -Version: 0.21.1 +Version: 0.21.2 Summary: http client/server for asyncio Home-page: https://github.com/KeepSafe/aiohttp/ Author: Andrew Svetlov @@ -150,6 +150,12 @@ CHANGES ======= + 0.21.2 (02-16-2016) + ------------------- + + - Fix a regression: support for handling ~/path in static file routes was + broken #782 + 0.21.1 (02-10-2016) ------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.1/aiohttp/__init__.py new/aiohttp-0.21.2/aiohttp/__init__.py --- old/aiohttp-0.21.1/aiohttp/__init__.py 2016-02-10 19:40:11.000000000 +0100 +++ new/aiohttp-0.21.2/aiohttp/__init__.py 2016-02-16 15:57:34.000000000 +0100 @@ -1,6 +1,6 @@ # This relies on each of the submodules having an __all__ variable. -__version__ = '0.21.1' +__version__ = '0.21.2' from . import hdrs # noqa diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.1/aiohttp/web_urldispatcher.py new/aiohttp-0.21.2/aiohttp/web_urldispatcher.py --- old/aiohttp-0.21.1/aiohttp/web_urldispatcher.py 2016-02-10 19:40:11.000000000 +0100 +++ new/aiohttp-0.21.2/aiohttp/web_urldispatcher.py 2016-02-16 15:57:34.000000000 +0100 @@ -440,7 +440,10 @@ self._prefix = prefix self._prefix_len = len(self._prefix) try: - directory = Path(directory).resolve() + directory = Path(directory) + if str(directory).startswith('~'): + directory = Path(os.path.expanduser(str(directory))) + directory = directory.resolve() if not directory.is_dir(): raise ValueError('Not a directory') except (FileNotFoundError, ValueError) as error: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.1/aiohttp.egg-info/PKG-INFO new/aiohttp-0.21.2/aiohttp.egg-info/PKG-INFO --- old/aiohttp-0.21.1/aiohttp.egg-info/PKG-INFO 2016-02-10 19:41:21.000000000 +0100 +++ new/aiohttp-0.21.2/aiohttp.egg-info/PKG-INFO 2016-02-16 15:59:17.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: aiohttp -Version: 0.21.1 +Version: 0.21.2 Summary: http client/server for asyncio Home-page: https://github.com/KeepSafe/aiohttp/ Author: Andrew Svetlov @@ -150,6 +150,12 @@ CHANGES ======= + 0.21.2 (02-16-2016) + ------------------- + + - Fix a regression: support for handling ~/path in static file routes was + broken #782 + 0.21.1 (02-10-2016) ------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.1/docs/gunicorn.rst new/aiohttp-0.21.2/docs/gunicorn.rst --- old/aiohttp-0.21.1/docs/gunicorn.rst 2016-02-10 19:40:11.000000000 +0100 +++ new/aiohttp-0.21.2/docs/gunicorn.rst 2016-02-16 15:57:34.000000000 +0100 @@ -37,9 +37,7 @@ ----------- Lets write a simple application, which we will save to file. We'll -name this file *my_app_module.py*: - -.. code-block:: python +name this file *my_app_module.py*:: from aiohttp import web diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.1/docs/server.rst new/aiohttp-0.21.2/docs/server.rst --- old/aiohttp-0.21.1/docs/server.rst 2016-02-10 19:40:11.000000000 +0100 +++ new/aiohttp-0.21.2/docs/server.rst 2016-02-16 15:57:34.000000000 +0100 @@ -16,9 +16,7 @@ Start implementing the basic server by inheriting the :class:`ServerHttpProtocol` object. Your class should implement the only method :meth:`ServerHttpProtocol.handle_request` -which must be a coroutine to handle requests asynchronously - - .. code-block:: python +which must be a coroutine to handle requests asynchronously:: from urllib.parse import urlparse, parse_qsl @@ -43,9 +41,7 @@ The next step is to create a loop and register your handler within a server. :exc:`KeyboardInterrupt` exception handling is necessary so you can stop -your server with Ctrl+C at any time. - - .. code-block:: python +your server with Ctrl+C at any time:: if __name__ == '__main__': loop = asyncio.get_event_loop() @@ -73,10 +69,7 @@ Currently aiohttp does not provide automatic parsing of incoming GET params. However aiohttp does provide a nice -:class:`MulitiDict` wrapper for already parsed params. - - - .. code-block:: python +:class:`MulitiDict` wrapper for already parsed params:: from urllib.parse import urlparse, parse_qsl @@ -97,9 +90,7 @@ POST data is accessed through the ``payload.read()`` generator method. If you have form data in the request body, you can parse it in the same way as -GET params. - - .. code-block:: python +GET params:: from urllib.parse import urlparse, parse_qsl @@ -119,9 +110,7 @@ --- To use asyncio's SSL support, just pass an SSLContext object to the -:meth:`asyncio.BaseEventLoop.create_server` method of the loop. - - .. code-block:: python +:meth:`asyncio.BaseEventLoop.create_server` method of the loop:: import ssl diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.1/docs/web.rst new/aiohttp-0.21.2/docs/web.rst --- old/aiohttp-0.21.1/docs/web.rst 2016-02-10 19:40:11.000000000 +0100 +++ new/aiohttp-0.21.2/docs/web.rst 2016-02-16 15:57:34.000000000 +0100 @@ -297,9 +297,7 @@ based on custom conditions can be accomplished by implementing a second layer of routing in your application. -The following example shows custom routing based on the *HTTP Accept* header: - -.. code-block:: python +The following example shows custom routing based on the *HTTP Accept* header:: class AcceptChooser: @@ -431,9 +429,7 @@ status code before returning. The following example shows how to setup a custom handler for the *Expect* -header: - -.. code-block:: python +header:: async def check_auth(request): if request.version != aiohttp.HttpVersion11: @@ -479,9 +475,7 @@ Then, in the :ref:`request handler <aiohttp-web-handler>` you can access the file input field as a :class:`FileField` instance. :class:`FileField` is simply -a container for the file as well as some of its metadata: - -.. code-block:: python +a container for the file as well as some of its metadata:: async def store_mp3_handler(request): @@ -513,9 +507,7 @@ To setup a *WebSocket*, create a :class:`WebSocketResponse` in a :ref:`request handler <aiohttp-web-handler>` and then use it to communicate -with the peer: - -.. code-block:: python +with the peer:: async def websocket_handler(request): @@ -863,9 +855,7 @@ (:class:`Application` is a good candidate). The following :term:`websocket` snippet shows an example for websocket -handler: - -.. code-block:: python +handler:: app = web.Application() app['websockets'] = [] @@ -883,11 +873,9 @@ return ws -Signal handler may looks like: - -.. code-block:: python +Signal handler may looks like:: - async with on_shutdown(app): + async def on_shutdown(app): for ws in app['websockets']: await ws.close(code=999, message='Server shutdown') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.1/docs/web_reference.rst new/aiohttp-0.21.2/docs/web_reference.rst --- old/aiohttp-0.21.1/docs/web_reference.rst 2016-02-10 19:40:11.000000000 +0100 +++ new/aiohttp-0.21.2/docs/web_reference.rst 2016-02-16 15:57:34.000000000 +0100 @@ -1679,7 +1679,7 @@ app.router.add_route('*', '/view', MyView) The view raises *405 Method Not allowed* - (:class:`HTTPMEthodNowAllowed`) if requested web verb is not + (:class:`HTTPMethodNowAllowed`) if requested web verb is not supported. :param request: instance of :class:`Request` that has initiated a view diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.1/setup.cfg new/aiohttp-0.21.2/setup.cfg --- old/aiohttp-0.21.1/setup.cfg 2016-02-10 19:41:21.000000000 +0100 +++ new/aiohttp-0.21.2/setup.cfg 2016-02-16 15:59:18.000000000 +0100 @@ -5,7 +5,7 @@ ignore = N801,N802,N803,E226 [egg_info] -tag_build = tag_date = 0 +tag_build = tag_svn_revision = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.1/tests/test_urldispatch.py new/aiohttp-0.21.2/tests/test_urldispatch.py --- old/aiohttp-0.21.1/tests/test_urldispatch.py 2016-02-10 19:40:11.000000000 +0100 +++ new/aiohttp-0.21.2/tests/test_urldispatch.py 2016-02-16 15:57:34.000000000 +0100 @@ -874,3 +874,17 @@ self.assertIsInstance(self.router.resources(), Sized) self.assertIsInstance(self.router.resources(), Iterable) self.assertIsInstance(self.router.resources(), Container) + + def test_static_route_user_home(self): + here = pathlib.Path(aiohttp.__file__).parent + home = pathlib.Path(os.path.expanduser('~')) + if not str(here).startswith(str(home)): # pragma: no cover + self.skipTest("aiohttp folder is not placed in user's HOME") + static_dir = '~/' + str(here.relative_to(home)) + route = self.router.add_static('/st', static_dir) + self.assertEqual(here, route.get_info()['directory']) + + def test_static_route_points_to_file(self): + here = pathlib.Path(aiohttp.__file__).parent / '__init__.py' + with self.assertRaises(ValueError): + self.router.add_static('/st', here) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiohttp-0.21.1/tests/test_web_functional.py new/aiohttp-0.21.2/tests/test_web_functional.py --- old/aiohttp-0.21.1/tests/test_web_functional.py 2016-02-10 19:40:11.000000000 +0100 +++ new/aiohttp-0.21.2/tests/test_web_functional.py 2016-02-16 15:57:34.000000000 +0100 @@ -790,6 +790,18 @@ self.loop.run_until_complete(go()) + def test_start_without_routes(self): + @asyncio.coroutine + def go(): + _, srv, url = yield from self.create_server(None, '/', None) + client = ClientSession(loop=self.loop) + resp = yield from client.get(url) + self.assertEqual(404, resp.status) + yield from resp.release() + client.close() + + self.loop.run_until_complete(go()) + class StaticFileMixin(WebFunctionalSetupMixin):