Support Python 3.9 (#4759)

* Update .travis.yml

* Update .travis.yml

* updage travis.yml

* Make 3.9 support official

* Upgrade mitmproxy for Python 3.9

* Restore the Pylint job

* Undo unintended change to mitmproxy requirement

* Enable Python 3.9 in GitHub Actions

* Work around reppy’s Python version limitation

* Disable tests in Windows / Python 3.9 due to a Twisted bug

Co-authored-by: Adrián Chaves <adrian@chaves.io>
This commit is contained in:
vinayak 2021-03-18 18:10:03 +05:30 committed by GitHub
parent ab037ab7c9
commit 42e4dbb23d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 28 additions and 10 deletions

View File

@ -7,19 +7,21 @@ jobs:
strategy: strategy:
matrix: matrix:
include: include:
- python-version: 3.8 - python-version: 3.9
env: env:
TOXENV: security TOXENV: security
- python-version: 3.8 - python-version: 3.9
env: env:
TOXENV: flake8 TOXENV: flake8
# Pylint requires installing reppy, which does not support Python 3.9
# https://github.com/seomoz/reppy/issues/122
- python-version: 3.8 - python-version: 3.8
env: env:
TOXENV: pylint TOXENV: pylint
- python-version: 3.8 - python-version: 3.9
env: env:
TOXENV: typing TOXENV: typing
- python-version: 3.7 # Keep in sync with .readthedocs.yml - python-version: 3.8 # Keep in sync with .readthedocs.yml
env: env:
TOXENV: docs TOXENV: docs

View File

@ -9,10 +9,10 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Set up Python 3.8 - name: Set up Python 3.9
uses: actions/setup-python@v2 uses: actions/setup-python@v2
with: with:
python-version: 3.8 python-version: 3.9
- name: Check Tag - name: Check Tag
id: check-release-tag id: check-release-tag

View File

@ -6,7 +6,7 @@ jobs:
runs-on: macos-10.15 runs-on: macos-10.15
strategy: strategy:
matrix: matrix:
python-version: [3.6, 3.7, 3.8] python-version: [3.6, 3.7, 3.8, 3.9]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2

View File

@ -13,6 +13,9 @@ jobs:
- python-version: 3.8 - python-version: 3.8
env: env:
TOXENV: py TOXENV: py
- python-version: 3.9
env:
TOXENV: py
- python-version: pypy3 - python-version: pypy3
env: env:
TOXENV: pypy3 TOXENV: pypy3
@ -31,10 +34,12 @@ jobs:
PYPY_VERSION: 3.6-v7.2.0 PYPY_VERSION: 3.6-v7.2.0
# extras # extras
# extra-deps includes reppy, which does not support Python 3.9
# https://github.com/seomoz/reppy/issues/122
- python-version: 3.8 - python-version: 3.8
env: env:
TOXENV: extra-deps TOXENV: extra-deps
- python-version: 3.8 - python-version: 3.9
env: env:
TOXENV: asyncio TOXENV: asyncio

View File

@ -16,6 +16,10 @@ jobs:
- python-version: 3.8 - python-version: 3.8
env: env:
TOXENV: py TOXENV: py
# https://twistedmatrix.com/trac/ticket/9990
#- python-version: 3.9
#env:
#TOXENV: py
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2

View File

@ -3,10 +3,14 @@ formats: all
sphinx: sphinx:
configuration: docs/conf.py configuration: docs/conf.py
fail_on_warning: true fail_on_warning: true
build:
image: latest
python: python:
# For available versions, see: # For available versions, see:
# https://docs.readthedocs.io/en/stable/config-file/v2.html#build-image # https://docs.readthedocs.io/en/stable/config-file/v2.html#build-image
version: 3.7 # Keep in sync with .travis.yml version: 3.8 # Keep in sync with .github/workflows/checks.yml
install: install:
- requirements: docs/requirements.txt - requirements: docs/requirements.txt
- path: . - path: .

View File

@ -85,6 +85,7 @@ setup(
'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy', 'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP',

View File

@ -13,7 +13,9 @@ deps =
-rtests/requirements-py3.txt -rtests/requirements-py3.txt
# mitmproxy does not support PyPy # mitmproxy does not support PyPy
# mitmproxy does not support Windows when running Python < 3.7 # mitmproxy does not support Windows when running Python < 3.7
mitmproxy >= 4.0.4; python_version >= '3.7' and implementation_name != 'pypy' # Python 3.9+ requires https://github.com/mitmproxy/mitmproxy/commit/8e5e43de24c9bc93092b63efc67fbec029a9e7fe
mitmproxy >= 5.3.0; python_version >= '3.9' and implementation_name != 'pypy'
mitmproxy >= 4.0.4; python_version >= '3.7' and python_version < '3.9' and implementation_name != 'pypy'
mitmproxy >= 4.0.4, < 5; python_version >= '3.6' and python_version < '3.7' and platform_system != 'Windows' and implementation_name != 'pypy' mitmproxy >= 4.0.4, < 5; python_version >= '3.6' and python_version < '3.7' and platform_system != 'Windows' and implementation_name != 'pypy'
# Extras # Extras
botocore>=1.4.87 botocore>=1.4.87