From 5fee5cd335f7c44364edef6f8e11e6cd66ef6202 Mon Sep 17 00:00:00 2001 From: Marat Sharafutdinov Date: Wed, 7 Oct 2020 12:56:06 +0300 Subject: [PATCH] Support Python 3.9 --- .github/workflows/build-darwin.yml | 9 +++++++++ .github/workflows/build-linux.yml | 9 +++++++++ .github/workflows/build-windows.yml | 12 ++++++++++++ .travis.yml | 10 +++++++--- CHANGES.rst | 2 +- dockerfiles/buildwheel.sh | 2 +- dockerfiles/develop/Dockerfile | 2 +- dockerfiles/slim/Dockerfile | 2 +- setup.py | 1 + tox.ini | 2 +- 10 files changed, 43 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-darwin.yml b/.github/workflows/build-darwin.yml index 7f31335..7e8d62c 100644 --- a/.github/workflows/build-darwin.yml +++ b/.github/workflows/build-darwin.yml @@ -12,6 +12,11 @@ jobs: steps: - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + name: Install Python 3.9 + with: + python-version: "3.9" + - uses: actions/setup-python@v1 name: Install Python 3.8 with: @@ -46,6 +51,10 @@ jobs: run: | pip install -r requirements-dev.txt + - name: Test for Python 3.9 + run: | + tox -e py39 + - name: Test for Python 3.8 run: | tox -e py38 diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index 504d124..1430405 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -12,6 +12,11 @@ jobs: steps: - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + name: Install Python 3.9 + with: + python-version: "3.9" + - uses: actions/setup-python@v1 name: Install Python 3.8 with: @@ -46,6 +51,10 @@ jobs: run: | pip install -r requirements-dev.txt + - name: Test for Python 3.9 + run: | + tox -e py39 + - name: Test for Python 3.8 run: | tox -e py38 diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 7f523a0..61eab76 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -18,6 +18,12 @@ jobs: steps: - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + name: Install Python 3.9 + with: + python-version: "3.9" + architecture: ${{ matrix.config.py-architecture }} + - uses: actions/setup-python@v1 name: Install Python 3.8 with: @@ -56,6 +62,12 @@ jobs: run: | pip install -r requirements-dev.txt + - name: Test for Python 3.9 + shell: cmd + run: | + call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -no_logo -arch=${{ matrix.config.vs-arch }} + tox -e py39 + - name: Test for Python 3.8 shell: cmd run: | diff --git a/.travis.yml b/.travis.yml index da33bc1..5d129c5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,12 +18,16 @@ matrix: sudo: true - python: 3.8 env: TOXENV=py38 - dist: xenial - sudo: true - - python: 'nightly' dist: bionic sudo: true + - python: 3.9 env: TOXENV=py39 + dist: focal + sudo: true + - python: 'nightly' + env: TOXENV=py310 + dist: focal + sudo: true allow_failures: - python: nightly diff --git a/CHANGES.rst b/CHANGES.rst index 77a5ecc..d725b85 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,7 +4,7 @@ CHANGES 2.x.x ----- - +- support Python 3.9 2.1.6 (2020-03-17) ------------------ diff --git a/dockerfiles/buildwheel.sh b/dockerfiles/buildwheel.sh index afc5646..dafa1d0 100755 --- a/dockerfiles/buildwheel.sh +++ b/dockerfiles/buildwheel.sh @@ -4,7 +4,7 @@ set -e -x ARCH=`uname -p` echo "arch=$ARCH" -for V in cp38-cp38 cp37-cp37m cp36-cp36m cp35-cp35m; do +for V in cp39-cp39 cp38-cp38 cp37-cp37m cp36-cp36m cp35-cp35m; do PYBIN=/opt/python/$V/bin rm -rf build src/cchardet/__pycache__ src/cchardet/*.cpp src/cchardet/*.pyc src/cchardet/*.so src/cchardet.egg-info src/tests/__pycache__ src/tests/*.pyc $PYBIN/pip install -r requirements-dev.txt diff --git a/dockerfiles/develop/Dockerfile b/dockerfiles/develop/Dockerfile index 7377ec3..d1c7074 100644 --- a/dockerfiles/develop/Dockerfile +++ b/dockerfiles/develop/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.8-buster +FROM python:3.9-buster RUN pip install -U cython chardet nose diff --git a/dockerfiles/slim/Dockerfile b/dockerfiles/slim/Dockerfile index cdf1916..265e176 100644 --- a/dockerfiles/slim/Dockerfile +++ b/dockerfiles/slim/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.8-slim-buster +FROM python:3.9-slim-buster ENV BUILD_DEPS gcc g++ diff --git a/setup.py b/setup.py index 2443b42..8b277d7 100644 --- a/setup.py +++ b/setup.py @@ -133,6 +133,7 @@ setup( 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', ], keywords=[ 'cython', diff --git a/tox.ini b/tox.ini index 793e85a..de48ebc 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py35, py36, py37, py38, py39 +envlist = py35, py36, py37, py38, py39, py310 [testenv] commands =