diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 709b194..3552484 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -28,7 +28,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ['3.6', '3.7'] + python-version: ['3.6', '3.7', '3.8'] name: Python ${{ matrix.python-version }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} diff --git a/.travis.yml b/.travis.yml index 9229b91..e02e115 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,9 +6,8 @@ matrix: python: "3.6" - env: TOXENV=py37 python: "3.7" - # see https://github.com/travis-ci/travis-ci/issues/9069#issuecomment-425720905 - dist: xenial - sudo: required + - env: TOXENV=py38 + python: "3.8" - env: TOXENV=pre-commit python: "3.6" diff --git a/requirements-dev.txt b/requirements-dev.txt index eb1bd5b..e916b85 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,4 +1,4 @@ -aiohttp<3.6 +aiohttp bottle bravado-core>=4.11.0 bravado[integration-tests,fido]>=11.0.1 diff --git a/setup.py b/setup.py index 28c9977..06db781 100644 --- a/setup.py +++ b/setup.py @@ -28,6 +28,7 @@ "Operating System :: OS Independent", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", ], install_requires=["aiohttp>=3.3", "bravado>=11.0.0", "yelp-bytes"], extras_require={ diff --git a/tests/future_adapter_test.py b/tests/future_adapter_test.py index 6df4e0d..a78a33f 100644 --- a/tests/future_adapter_test.py +++ b/tests/future_adapter_test.py @@ -1,6 +1,5 @@ import asyncio import concurrent.futures -import sys import time import mock @@ -58,13 +57,9 @@ def test_future_adapter(mock_future, mock_response): assert 0 < result.remaining_timeout < 5 -@pytest.mark.skipif( - sys.version_info >= (3, 8), - reason="This does not seem to hold true for Python 3.8+ anymore", -) def test_future_adapter_timeout_error_class(): """Let's make sure refactors never break timeout errors""" - assert concurrent.futures.TimeoutError in AsyncioFutureAdapter.timeout_errors + assert concurrent.futures.TimeoutError in FutureAdapter.timeout_errors def test_asyncio_future_adapter(mock_future, mock_wait_for, mock_response, event_loop): diff --git a/tests/integration/integration_test.py b/tests/integration/integration_test.py index a5194c8..73b5edb 100644 --- a/tests/integration/integration_test.py +++ b/tests/integration/integration_test.py @@ -16,6 +16,7 @@ from bravado.exception import HTTPBadRequest from bravado.exception import HTTPInternalServerError from bravado.exception import HTTPNotFound +from bravado.requests_client import RequestsClient from bravado_core.model import Model from bravado_asyncio import http_client @@ -168,6 +169,11 @@ def test_delete_query_args(swagger_client): def test_post_file_upload(swagger_client): + if isinstance(swagger_client.swagger_spec.http_client, RequestsClient): + pytest.xfail( + "Bug in aiohttp (used in the integration server) - see https://github.com/aio-libs/aiohttp/pull/4090" + ) + with open( os.path.join(os.path.dirname(__file__), "../../testing/sample.jpg"), "rb" ) as image: @@ -181,6 +187,11 @@ def test_post_file_upload(swagger_client): def test_post_file_upload_stream_no_name(swagger_client): + if isinstance(swagger_client.swagger_spec.http_client, RequestsClient): + pytest.xfail( + "Bug in aiohttp (used in the integration server) - see https://github.com/aio-libs/aiohttp/pull/4090" + ) + with open( os.path.join(os.path.dirname(__file__), "../../testing/sample.jpg"), "rb" ) as image: diff --git a/tox.ini b/tox.ini index 7e1ec23..ca229f4 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py36, py37, pre-commit +envlist = py36, py37, py38, pre-commit tox_pip_extensions_ext_venv_update = true tox_pip_extensions_ext_pip_custom_platform = true