Skip to content

Commit

Permalink
Add python 38 support (#26)
Browse files Browse the repository at this point in the history
* Ran black formatter

* Moved table of contents in README

* Add Python 3.8 trove classifier

* Add a downloads badge, and a "code style: black" badge.

* Don't cover difference in import requirements between 3.6 and 3.7

* uvloop not working on 3.8 yet

* Use docker compose for testing different pythons

* Fix travis windows build

* The actual fix for travis windows
  • Loading branch information
cjrh authored Oct 21, 2019
1 parent 050a3d4 commit f081d81
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 17 deletions.
9 changes: 4 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ matrix:
- python: "3.5"
- python: "3.6"
- python: "3.7"
dist: xenial
- python: '3.8-dev'
dist: xenial
- python: "3.8"
- python: "nightly"
dist: xenial
- os: osx
Expand All @@ -23,11 +21,12 @@ matrix:
language: sh
python: "3.7"
before_install:
- choco install python3
- export PATH="/c/Python37:/c/Python37/Scripts:$PATH"
- choco install python --version 3.8.0
- python -V
- python -m venv venv
- venv/Scripts/activate.bat
- python -m pip install --upgrade pip wheel
env: PATH=/c/Python38:/c/Python38/Scripts:$PATH

install:
- "pip install -r requirements-test.txt"
Expand Down
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.. contents:: Table of Contents

.. image:: https://travis-ci.org/cjrh/aiorun.svg?branch=master
:target: https://travis-ci.org/cjrh/aiorun
Expand Down
2 changes: 1 addition & 1 deletion aiorun.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# in Python 3.7; remove ImportError handling when we drop support for
# 3.6.
from asyncio import all_tasks
except ImportError:
except ImportError: # pragma: no cover
all_tasks = Task.all_tasks


Expand Down
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: "3.7"
services:
test37:
build:
context: .
dockerfile: test.dockerfile
test38:
build:
context: .
dockerfile: test38.dockerfile
2 changes: 1 addition & 1 deletion requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ typing; python_version < '3.5'
pytest==4.3.0
pytest-cov
coveralls
uvloop; sys_platform != 'win32'
uvloop; sys_platform != 'win32' and python_version < '3.8'
flit
18 changes: 8 additions & 10 deletions test.dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
FROM python:3.7-stretch

RUN apt-get update
RUN apt-get install -y vim less
RUN apt-get update && apt-get install -y \
vim \
less

VOLUME /opt/project

#RUN mkdir /opt/project
ADD . /opt/project

WORKDIR /opt/project
RUN python3.7 -m pip install \
COPY ./requirements-test.txt /requirements-test.txt
RUN python -m pip install \
-r requirements-test.txt \
flit \
pygments
COPY . /opt/project
WORKDIR /opt/project
RUN FLIT_ROOT_INSTALL=1 flit install --pth-file

CMD ["/bin/bash"]
CMD ["/bin/bash"]
16 changes: 16 additions & 0 deletions test38.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM python:3.8-slim

RUN apt-get update && apt-get install -y \
vim \
less

COPY ./requirements-test.txt /requirements-test.txt
RUN python -m pip install \
-r requirements-test.txt \
flit \
pygments
COPY . /opt/project
WORKDIR /opt/project
RUN FLIT_ROOT_INSTALL=1 flit install --pth-file

CMD ["/bin/bash"]
1 change: 1 addition & 0 deletions tests/test_posix.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ async def main():
assert not loop.is_closed()


@pytest.mark.skipif(sys.version_info >= (3, 8), reason="uvloop not working on 3.8")
def test_uvloop():
"""Basic SIGTERM"""

Expand Down

0 comments on commit f081d81

Please sign in to comment.