Skip to content

Commit

Permalink
remove aiohttp_debugtoolbar as requirement, uprev travis (#216)
Browse files Browse the repository at this point in the history
* remove aiohttp_debugtoolbar as requirement, uprev travis

* fix matrix

* allow 3.7 to fail for now :-(
  • Loading branch information
samuelcolvin authored Dec 7, 2018
1 parent 8ccd7d6 commit 50d6d88
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 16 deletions.
29 changes: 18 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,26 @@ cache: pip
services:
- postgresql

python:
- '3.5'
- '3.6'
- 'nightly' # currently 3.7

env:
# TODO keep this up to date
- 'AIOHTTP_VERSION=aiohttp==3.4.4' # WARNING: if you change this, change it in deploy too
- 'AIOHTTP_VERSION=https://github.com/aio-libs/aiohttp/archive/master.zip'

matrix:
include:
- python: '3.5'
env: 'AIOHTTP_VERSION=aiohttp==3.4.4'
- python: '3.6'
env: 'AIOHTTP_VERSION=aiohttp==3.4.4' # WARNING: if you change this, change it in deploy too
- python: '3.6'
env: 'AIOHTTP_VERSION=https://github.com/aio-libs/aiohttp/archive/master.zip'
- python: '3.7'
dist: xenial
sudo: required
env: 'AIOHTTP_VERSION=aiohttp==3.4.4'
- python: '3.8-dev'
dist: xenial
sudo: required
env: 'AIOHTTP_VERSION=aiohttp==3.4.4'

allow_failures:
- python: 'nightly'
- python: '3.8-dev'
- python: '3.7' # temporary until we can fix tests for 3.7
- env: 'AIOHTTP_VERSION=https://github.com/aio-libs/aiohttp/archive/master.zip'

install:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.PHONY: install
install:
pip install -U setuptools pip
pip install -U .
pip install -e .
pip install -r tests/requirements.txt
grablib

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ First let's create a clean python environment to work in and install aiohttp-dev
.. code:: shell
mkdir my_new_app && cd my_new_app
virtualenv -p `which python3.5` env
virtualenv -p `which python3.7` env
. env/bin/activate
pip install aiohttp-devtools
Expand Down
9 changes: 7 additions & 2 deletions aiohttp_devtools/runserver/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from pathlib import Path
from typing import Optional

import aiohttp_debugtoolbar
from aiohttp import WSMsgType, web
from aiohttp.hdrs import LAST_MODIFIED
from aiohttp.web import FileResponse, Response
Expand All @@ -22,6 +21,12 @@
from .log_handlers import AccessLogger, fmt_size
from .utils import MutableValue

try:
import aiohttp_debugtoolbar
except ImportError: # pragma: no cover
# aiohttp_debugtoolbar is not a required dependency
aiohttp_debugtoolbar = None

LIVE_RELOAD_HOST_SNIPPET = '\n<script src="http://{}:{}/livereload.js"></script>\n'
LIVE_RELOAD_LOCAL_SNIPPET = b'\n<script src="/livereload.js"></script>\n'
JINJA_ENV = 'aiohttp_jinja2_environment'
Expand Down Expand Up @@ -71,7 +76,7 @@ async def static_middleware(request, handler):
dft_logger.debug('settings app static_root_url to "%s"', static_url)
app['static_root_url'] = MutableValue(static_url)

if config.debug_toolbar:
if config.debug_toolbar and aiohttp_debugtoolbar:
aiohttp_debugtoolbar.setup(app, intercept_redirects=False)


Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
""",
install_requires=[
'aiohttp>=3.2.0',
'aiohttp_debugtoolbar>=0.4.0',
'click>=6.6',
'isort>=4.3.3',
'Jinja2>=2.10',
Expand Down
1 change: 1 addition & 0 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
aiohttp_debugtoolbar==0.5.0
click==7.0.0
coverage==4.5.2
docutils==0.14
Expand Down

0 comments on commit 50d6d88

Please sign in to comment.