Skip to content

Commit

Permalink
Scheduled monthly dependency update for January (#220)
Browse files Browse the repository at this point in the history
* Update aiohttp from 3.4.4 to 3.5.1

* Update pytest from 4.0.1 to 4.0.2

* Update pytest from 4.0.1 to 4.0.2

* Update sqlalchemy from 1.2.14 to 1.2.15

* Update sqlalchemy from 1.2.14 to 1.2.15

* Update pytest-xdist from 1.24.1 to 1.25.0

* Update sphinx from 1.8.2 to 1.8.3

* fix with latest aiohttp
  • Loading branch information
pyup.io bot authored and samuelcolvin committed Jan 7, 2019
1 parent dc0ce8e commit 1375114
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion aiohttp_devtools/runserver/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ async def src_reload(app, path: str = None):
is_html = mimetypes.guess_type(path)[0] == 'text/html'

reloads = 0
aux_logger.debug('prompting source reload for %d clients', len(app[WS]))
aux_logger.debug('prompting source reload for %d clients', cli_count)
for ws, url in app[WS]:
if path and is_html and path not in {url, url + '.html', url.rstrip('/') + '/index.html'}:
aux_logger.debug('skipping reload for client at %s', url)
Expand Down
2 changes: 1 addition & 1 deletion aiohttp_devtools/runserver/watch.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ async def _src_reload_when_live(self, checks=20):
url = 'http://localhost:{.main_port}/?_checking_alive=1'.format(self._config)
logger.debug('checking app at "%s" is running before prompting reload...', url)
for i in range(checks):
await asyncio.sleep(0.1, loop=self._app.loop)
await asyncio.sleep(0.1)
try:
async with self._session.get(url):
pass
Expand Down
2 changes: 1 addition & 1 deletion aiohttp_devtools/start/template/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def pg_dsn(settings: Settings) -> str:


async def startup(app: web.Application):
app['pg_engine'] = await create_engine(pg_dsn(app['settings']), loop=app.loop)
app['pg_engine'] = await create_engine(pg_dsn(app['settings']))


async def cleanup(app: web.Application):
Expand Down
6 changes: 3 additions & 3 deletions aiohttp_devtools/start/template/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# {# This file is special: lines are made unique, stripped and sorted before the new requirements.txt file is created #}
# you will need to install these requirements with `pip install -r requirements.txt`

aiohttp==3.4.4
pytest==4.0.1
aiohttp==3.5.1
pytest==4.0.2
pytest-aiohttp==0.3.0
pytest-cov==2.6.0

Expand All @@ -16,5 +16,5 @@ aiohttp-session[secure]==2.7.0

# {% if database.is_pg_sqlalchemy %}
aiopg==0.15.0
SQLAlchemy==1.2.14
SQLAlchemy==1.2.15
# {% endif %}
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ max-complexity = 10
exclude = aiohttp_devtools/start/template

[bdist_wheel]
python-tag = py35.py36
python-tag = py35.py36.py37

[isort]
known_first_party=aiohttp_devtools
Expand Down
8 changes: 4 additions & 4 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ flake8==3.6.0
grablib==0.6.1 # pyup: ignore (last version which is compatible with python 3.5)
pycodestyle==2.4.0
pyflakes==2.0.0
pytest==4.0.1
pytest==4.0.2
pytest-aiohttp==0.3.0
pytest-cov==2.6.0
pytest-isort==0.2.1
pytest-mock==1.10.0
pytest-sugar==0.9.2
pytest-timeout==1.3.3
pytest-toolbox==0.4
pytest-xdist==1.24.1
Sphinx==1.8.2
pytest-xdist==1.25.0
Sphinx==1.8.3

# required to run "start" apps
aiohttp-jinja2==1.1.0
aiohttp-session[secure]==2.7.0
aiohttp-session[aioredis]==2.7.0
aiopg==0.15.0
SQLAlchemy==1.2.14
SQLAlchemy==1.2.15
7 changes: 6 additions & 1 deletion tests/test_runserver_watch.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import asyncio
from platform import system as get_os_family
from unittest.mock import MagicMock, call

Expand Down Expand Up @@ -75,7 +76,11 @@ async def test_python_no_server(loop, mocker):
app_task._stop_dev_server = MagicMock()
app = Application()
app.src_reload = MagicMock()
app['websockets'] = [None]
mock_ws = MagicMock()
f = asyncio.Future()
f.set_result(1)
mock_ws.send_str = MagicMock(return_value=f)
app['websockets'] = [(mock_ws, '/')]
app_task._app = app
await app_task._run(2)
assert app_task._app.src_reload.called is False
Expand Down

0 comments on commit 1375114

Please sign in to comment.