Skip to content

Commit

Permalink
Drop python 3.8 support
Browse files Browse the repository at this point in the history
  • Loading branch information
jairhenrique committed Jul 7, 2023
1 parent 4f70152 commit ba4e988
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "pypy-3.8"]
python-version: ["3.9", "3.10", "3.11", "pypy-3.8"]

steps:
- uses: actions/[email protected]
Expand Down
12 changes: 6 additions & 6 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ The test suite is pretty big and slow, but you can tell tox to only run specific

tox -e {pyNN}-{HTTP_LIBRARY} -- <pytest flags passed through>

tox -e py38-requests -- -v -k "'test_status_code or test_gzip'"
tox -e py38-requests -- -v --last-failed
tox -e py39-requests -- -v -k "'test_status_code or test_gzip'"
tox -e py39-requests -- -v --last-failed

This will run only tests that look like ``test_status_code`` or
``test_gzip`` in the test suite, and only in the python 3.8 environment
``test_gzip`` in the test suite, and only in the python 3.9 environment
that has ``requests`` installed.

Also, in order for the boto tests to run, you will need an AWS key.
Expand Down Expand Up @@ -130,17 +130,17 @@ in this example::
pip3 install tox tox-pyenv

# Install supported versions (at time of writing), this does not activate them
pyenv install 3.8.0 pypy3.8
pyenv install 3.9.0 pypy3.8

# This activates them
pyenv local 3.8.0 pypy3.8
pyenv local 3.9.0 pypy3.8

# Run the whole test suite
tox

# Run the whole test suite or just part of it
tox -e lint
tox -e py38-requests
tox -e py39-requests


Troubleshooting on MacOSX
Expand Down
2 changes: 1 addition & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ with pip::
Compatibility
-------------

VCR.py supports Python 3.8+, and `pypy <http://pypy.org>`__.
VCR.py supports Python 3.9+, and `pypy <http://pypy.org>`__.

The following HTTP libraries are supported:

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ select = [
"W", # pycodestyle warning
]
line-length = 110
target-version = "py38"
target-version = "py39"

[tool.ruff.isort]
known-first-party = [ "vcr" ]
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def run_tests(self):
author_email="[email protected]",
url="https://github.com/kevin1024/vcrpy",
packages=find_packages(exclude=["tests*"]),
python_requires=">=3.8",
python_requires=">=3.9",
install_requires=install_requires,
license="MIT",
tests_require=tests_require,
Expand All @@ -95,7 +95,6 @@ def run_tests(self):
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand Down
17 changes: 8 additions & 9 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ skip_missing_interpreters=true
envlist =
cov-clean,
lint,
{py38,py39,py310,py311}-{requests-urllib3-1,httplib2,urllib3-1,tornado4,boto3,aiohttp,httpx},
{py39,py310,py311}-{requests-urllib3-1,httplib2,urllib3-1,tornado4,boto3,aiohttp,httpx},
{py310,py311}-{requests-urllib3-2,urllib3-2},
{pypy3}-{requests-urllib3-1,httplib2,urllib3-1,tornado4,boto3},
{py310}-httpx019,
Expand All @@ -12,7 +12,6 @@ envlist =

[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310, lint
3.11: py311
Expand Down Expand Up @@ -61,9 +60,9 @@ deps =
# In other circumstances, we might want to generate a PDF or an ebook
commands =
sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
# We use Python 3.8. Tox sometimes tries to autodetect it based on the name of
# We use Python 3.9. Tox sometimes tries to autodetect it based on the name of
# the testenv, but "docs" does not give useful clues so we have to be explicit.
basepython = python3.8
basepython = python3.9

[testenv]
# Need to use develop install so that paths
Expand All @@ -89,14 +88,14 @@ deps =
aiohttp: pytest-asyncio
aiohttp: pytest-aiohttp
httpx: httpx
{py38,py39,py310}-{httpx}: httpx
{py38,py39,py310}-{httpx}: pytest-asyncio
{py39,py310}-{httpx}: httpx
{py39,py310}-{httpx}: pytest-asyncio
httpx: httpx>0.19
httpx019: httpx==0.19
{py38,py39,py310}-{httpx}: pytest-asyncio
{py39,py310}-{httpx}: pytest-asyncio
depends =
lint,{py38,py39,py310,py311,pypy3}-{requests-urllib3-1,httplib2,urllib3-1,tornado4,boto3},{py310,py311}-{requests-urllib3-2,urllib3-2},{py38,py39,py310,py311}-{aiohttp},{py38,py39,py310,py311}-{httpx}: cov-clean
cov-report: lint,{py38,py39,py310,py311,pypy3}-{requests-urllib3-1,httplib2,urllib3-1,tornado4,boto3},{py310,py311}-{requests-urllib3-2,urllib3-2},{py38,py39,py310,py311}-{aiohttp}
lint,{py39,py310,py311,pypy3}-{requests-urllib3-1,httplib2,urllib3-1,tornado4,boto3},{py310,py311}-{requests-urllib3-2,urllib3-2},{py39,py310,py311}-{aiohttp},{py39,py310,py311}-{httpx}: cov-clean
cov-report: lint,{py39,py310,py311,pypy3}-{requests-urllib3-1,httplib2,urllib3-1,tornado4,boto3},{py310,py311}-{requests-urllib3-2,urllib3-2},{py39,py310,py311}-{aiohttp}
passenv =
AWS_ACCESS_KEY_ID
AWS_DEFAULT_REGION
Expand Down
3 changes: 2 additions & 1 deletion vcr/stubs/aiohttp_stubs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
import functools
import json
import logging
from collections.abc import Mapping
from http.cookies import CookieError, Morsel, SimpleCookie
from typing import Mapping, Union
from typing import Union

from aiohttp import ClientConnectionError, ClientResponse, CookieJar, RequestInfo, hdrs, streams
from aiohttp.helpers import strip_auth_from_url
Expand Down

0 comments on commit ba4e988

Please sign in to comment.