diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..e6c01e5 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +version: 2 + +updates: + - package-ecosystem: pip + directory: "/" + schedule: + interval: weekly + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: weekly diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..a890578 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,40 @@ +name: Test + +on: + push: + branches: + - master + pull_request: + branches: + - "*" + +jobs: + build: + runs-on: ubuntu-latest + continue-on-error: true + strategy: + matrix: + python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "pypy3"] + + steps: + - name: Install libgnutls28-dev + run: | + sudo apt update -q + sudo apt install -q -y libgnutls28-dev libcurl4-gnutls-dev + + - uses: actions/checkout@v1 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install project dependencies + run: | + python -m pip install -U pip codecov tox tox-gh-actions + + - name: Run tests with tox + run: tox + + - name: Run coverage + run: codecov diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ac04622..0000000 --- a/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -dist: xenial -language: python -matrix: - include: - # Only run lint on a single 3.x - - env: TOX_SUFFIX="lint" - python: "3.7" - -python: - - "3.6" - - "3.7" - - "3.8" - - "pypy3" - -before_install: - - openssl version - - sudo apt-get install libgnutls28-dev - -install: - - pip install tox-travis codecov - - if [[ $TOX_SUFFIX != 'lint' ]]; then python setup.py install ; fi -script: - - tox -after_success: - - codecov diff --git a/docs/installation.rst b/docs/installation.rst index 113d8e0..f47efc9 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -9,7 +9,7 @@ with pip:: Compatibility ------------- -VCR.py supports Python 3.5+, and `pypy `__. +VCR.py supports Python 3.6+, and `pypy `__. The following HTTP libraries are supported: diff --git a/setup.py b/setup.py index 9403405..8a031ce 100644 --- a/setup.py +++ b/setup.py @@ -59,7 +59,7 @@ setup( author_email="me@kevinmccarthy.org", url="https://github.com/kevin1024/vcrpy", packages=find_packages(exclude=["tests*"]), - python_requires=">=3.5", + python_requires=">=3.6", install_requires=install_requires, license="MIT", tests_require=["pytest", "mock", "pytest-httpbin"], @@ -72,6 +72,8 @@ setup( "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", diff --git a/tests/integration/test_requests.py b/tests/integration/test_requests.py index 8665bdf..b913f75 100644 --- a/tests/integration/test_requests.py +++ b/tests/integration/test_requests.py @@ -1,8 +1,5 @@ -# -*- coding: utf-8 -*- """Test requests' interaction with vcr""" -import platform import pytest -import sys import vcr from assertions import assert_cassette_empty, assert_is_json @@ -117,10 +114,6 @@ def test_post_chunked_binary(tmpdir, httpbin): @pytest.mark.skipif("sys.version_info >= (3, 6)", strict=True, raises=ConnectionError) -@pytest.mark.skipif( - (3, 5) < sys.version_info < (3, 6) and platform.python_implementation() == "CPython", - reason="Fails on CPython 3.5", -) def test_post_chunked_binary_secure(tmpdir, httpbin_secure): """Ensure that we can send chunked binary without breaking while trying to concatenate bytes with str.""" data1 = iter([b"data", b"to", b"send"]) diff --git a/tox.ini b/tox.ini index 295fe09..a4db6d0 100644 --- a/tox.ini +++ b/tox.ini @@ -3,10 +3,20 @@ skip_missing_interpreters=true envlist = cov-clean, lint, - {py36,py37,py38}-{requests,httplib2,urllib3,tornado4,boto3,aiohttp,httpx}, + {py36,py37,py38,py39,py310}-{requests,httplib2,urllib3,tornado4,boto3,aiohttp,httpx}, {pypy3}-{requests,httplib2,urllib3,tornado4,boto3}, cov-report + +[gh-actions] +python = + 3.6: py36 + 3.7: py37, lint + 3.8: py38 + 3.9: py39 + 3.10: py310 + pypy-3: pypy3 + # Coverage environment tasks: cov-clean and cov-report # https://pytest-cov.readthedocs.io/en/latest/tox.html [testenv:cov-clean] @@ -32,6 +42,7 @@ commands = deps = flake8 black +basepython = python3.7 [testenv:docs] # Running sphinx from inside the "docs" directory @@ -78,11 +89,11 @@ deps = aiohttp: pytest-asyncio aiohttp: pytest-aiohttp httpx: httpx - {py36,py37,py38}-{httpx}: httpx - {py36,py37,py38}-{httpx}: pytest-asyncio + {py36,py37,py38,py39,py310}-{httpx}: httpx + {py36,py37,py38,py39,py310}-{httpx}: pytest-asyncio depends = - lint,{py36,py37,py38,pypy3}-{requests,httplib2,urllib3,tornado4,boto3},{py36,py37,py38}-{aiohttp},{py36,py37,py38}-{httpx}: cov-clean - cov-report: lint,{py36,py37,py38,pypy3}-{requests,httplib2,urllib3,tornado4,boto3},{py36,py37,py38}-{aiohttp} + lint,{py36,py37,py38,py39,py310,pypy3}-{requests,httplib2,urllib3,tornado4,boto3},{py36,py37,py38,py39,py310}-{aiohttp},{py36,py37,py38,py39,py310}-{httpx}: cov-clean + cov-report: lint,{py36,py37,py38,py39,py310,pypy3}-{requests,httplib2,urllib3,tornado4,boto3},{py36,py37,py38,py39,py310}-{aiohttp} passenv = AWS_ACCESS_KEY_ID AWS_DEFAULT_REGION