From 689f35f55968a17ef37190d5fba9f41c9e837769 Mon Sep 17 00:00:00 2001 From: Samuel Colvin Date: Tue, 21 May 2019 15:50:37 +0100 Subject: [PATCH] fix 'adev serve ...' (#235) * fix 'adev serve ...' * fix tests * upref --- HISTORY.rst | 6 ++++++ README.rst | 2 +- aiohttp_devtools/runserver/main.py | 2 +- aiohttp_devtools/version.py | 2 +- tests/test_serve.py | 6 +++--- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index de82697c..bbd066f3 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,6 +3,12 @@ History ------- +0.13.0 (2019-05-21) +------------------- +* greatly simplify the ``start`` command, #233 +* disable coloured output on windows, #234 +* fix ``adev serve ...``, #235 + 0.12.0 (2019-02-20) ------------------- * fix tests for python 3.7, #218 diff --git a/README.rst b/README.rst index 2da66c52..9adaa545 100644 --- a/README.rst +++ b/README.rst @@ -14,7 +14,7 @@ libraries. Installation ------------ -Requires **python 3.5** or **python 3.6**. +Requires **python 3.5**, **python 3.6** or **python 3.7**. .. code:: shell diff --git a/aiohttp_devtools/runserver/main.py b/aiohttp_devtools/runserver/main.py index dc088f15..5c81372a 100644 --- a/aiohttp_devtools/runserver/main.py +++ b/aiohttp_devtools/runserver/main.py @@ -87,4 +87,4 @@ def serve_static(*, static_path: str, livereload: bool = True, port: int = 8000) livereload_status = 'ON' if livereload else 'OFF' logger.info('Serving "%s" at http://localhost:%d, livereload %s', static_path, port, livereload_status) - return app, port, loop + return app, port, loop, AuxAccessLogger diff --git a/aiohttp_devtools/version.py b/aiohttp_devtools/version.py index e9ad5a00..7499e310 100644 --- a/aiohttp_devtools/version.py +++ b/aiohttp_devtools/version.py @@ -2,4 +2,4 @@ __all__ = ['VERSION'] -VERSION = StrictVersion('0.12') +VERSION = StrictVersion('0.13') diff --git a/tests/test_serve.py b/tests/test_serve.py index edb8b948..7776d2b1 100644 --- a/tests/test_serve.py +++ b/tests/test_serve.py @@ -9,7 +9,7 @@ @pytest.yield_fixture def cli(loop, tmpworkdir, aiohttp_client): asyncio.set_event_loop(loop) - app, _, _ = serve_static(static_path=str(tmpworkdir), livereload=False) + app, _, _, _ = serve_static(static_path=str(tmpworkdir), livereload=False) yield loop.run_until_complete(aiohttp_client(app)) @@ -33,7 +33,7 @@ async def test_file_missing(cli): async def test_html_file_livereload(loop, aiohttp_client, tmpworkdir): - app, port, _ = serve_static(static_path=str(tmpworkdir), livereload=True) + app, port, _, _ = serve_static(static_path=str(tmpworkdir), livereload=True) assert port == 8000 cli = await aiohttp_client(app) mktree(tmpworkdir, { @@ -52,7 +52,7 @@ async def test_html_file_livereload(loop, aiohttp_client, tmpworkdir): async def test_serve_index(loop, aiohttp_client, tmpworkdir): - app, port, _ = serve_static(static_path=str(tmpworkdir), livereload=False) + app, port, _, _ = serve_static(static_path=str(tmpworkdir), livereload=False) assert port == 8000 cli = await aiohttp_client(app) mktree(tmpworkdir, {