From 8c70e2204ce3a8beab89f64dabbccc43f0292d9d Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 6 Nov 2022 14:23:06 +0200 Subject: [PATCH 01/15] Add support for Python 3.11 --- .github/workflows/python-package.yml | 4 ++-- .travis.yml | 9 +++++---- CHANGELOG.rst | 5 +++++ pyproject.toml | 2 +- setup.py | 1 + tox.ini | 12 ++++++------ 6 files changed, 20 insertions(+), 13 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 941f9e8..da1ad42 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -33,13 +33,13 @@ jobs: run: | pytest tests/ - pytest-py36-py310: + pytest-py36-py311: runs-on: ${{ matrix.platform }} strategy: matrix: platform: [ ubuntu-latest, macos-latest, windows-latest ] - python-version: [ "3.6", "3.7", "3.8", "3.9", "3.10" ] + python-version: [ "3.6", "3.7", "3.8", "3.9", "3.10", "3.11" ] steps: - uses: actions/checkout@v2 diff --git a/.travis.yml b/.travis.yml index 1e68af5..5700f46 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,8 @@ python: - "3.7" - "3.8" - "3.9" - - "3.10-dev" # 3.10 development branch + - "3.10" + - "3.11-dev" # development branch - "pypy" - "pypy3" jobs: @@ -18,14 +19,14 @@ jobs: python: "2.7" - arch: ppc64le python: "pypy" - - arch: ppc64le + - arch: ppc64le python: "pypy3" - arch: amd64 python: "pypy" - + allow_failures: - python: "3.10-dev" - + install: - pip install coveralls tox-travis script: diff --git a/CHANGELOG.rst b/CHANGELOG.rst index afa9b3a..813d7a0 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -23,6 +23,11 @@ v1.2.14 (unreleased) Bug fix release +Other +----- + +- Add support for Python 3.11. + v1.2.13 (2021-09-05) ==================== diff --git a/pyproject.toml b/pyproject.toml index 4daa17f..bc940ec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.black] line-length = 120 skip-string-normalization = true -target-version = ['py27', 'py34', 'py35', 'py36', 'py37', 'py38'] +target-version = ['py27', 'py34', 'py35', 'py36', 'py37', 'py38', 'py39', 'py310', 'py311'] include = '\.pyi?$' [tool.isort] diff --git a/setup.py b/setup.py index 0828027..a071bab 100755 --- a/setup.py +++ b/setup.py @@ -179,6 +179,7 @@ def function_three(): 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', 'Topic :: Software Development :: Libraries :: Python Modules', ], extras_require={ diff --git a/tox.ini b/tox.ini index 1e869ce..a37b58c 100644 --- a/tox.ini +++ b/tox.ini @@ -11,19 +11,19 @@ # - /usr/local/bin/pypy -> /opt/pypy2.7-v7.3.0-osx64/bin/pypy # - /usr/local/bin/pypy3 -> /opt/pypy3.6-v7.3.0-osx64/bin/pypy3 envlist = - py{27,34,35,36,37,38,39,310}-wrapt{1.10,1.11,1.12,1.13} + py{27,34,35,36,37,38,39,310,311}-wrapt{1.10,1.11,1.12,1.13} pypy, pypy3 docs [testenv] commands = pytest --cov-report term-missing --cov=deprecated tests/ deps = - py27,py34,py35: pip >= 9.0.3, < 21 - py27,py34: PyTest < 5 - py35,py36,py37,py38,py39,pypy,pypy3: PyTest - py27,py34: PyTest-Cov < 2.6 + py{27,34,35}: pip >= 9.0.3, < 21 + py{27,34}: PyTest < 5 + py{35,36,37,38,39,310,311,py,py3}: PyTest + py{27,34}: PyTest-Cov < 2.6 py34: typing # required by pytest->attrs - py35,py36,py37,py38,py39,py310,pypy,pypy3: PyTest-Cov + py{35,36,37,38,39,310,311,py,py3}: PyTest-Cov wrapt1.10: wrapt ~= 1.10.0 wrapt1.11: wrapt ~= 1.11.0 wrapt1.12: wrapt ~= 1.12.0 From 198870f6993b0eb7d953d00ccd5655fb49b9682c Mon Sep 17 00:00:00 2001 From: Colin Dean Date: Thu, 15 Dec 2022 22:23:06 -0500 Subject: [PATCH 02/15] Bump checkout to v3 in CodeQL Analysis workflow --- .github/workflows/codeql-analysis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 4c62682..dfd49c9 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -39,7 +39,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL From cc5c60f269c755e5d27e3601179ae2a1b17d2eb4 Mon Sep 17 00:00:00 2001 From: Colin Dean Date: Thu, 15 Dec 2022 22:23:56 -0500 Subject: [PATCH 03/15] Drops Actions builds for Python 2.7, 3.5, 3.6; condense 3.7+ --- .github/workflows/python-package.yml | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index da1ad42..56576b1 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -10,37 +10,14 @@ on: branches: [ master ] jobs: - pytest-py27-p35: - runs-on: ${{ matrix.platform }} - + pytest: strategy: matrix: platform: [ ubuntu-latest, macos-latest, windows-latest ] - python-version: [ 2.7, 3.5 ] + python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ] - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade 'pip < 21' - python -m pip install 'PyTest < 5' - python -m pip install -e . - - name: Test with pytest - run: | - pytest tests/ - - pytest-py36-py311: runs-on: ${{ matrix.platform }} - strategy: - matrix: - platform: [ ubuntu-latest, macos-latest, windows-latest ] - python-version: [ "3.6", "3.7", "3.8", "3.9", "3.10", "3.11" ] - steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} From 8cc3832444791712badd9fbe95dd6e3b38ef102a Mon Sep 17 00:00:00 2001 From: Colin Dean Date: Thu, 15 Dec 2022 22:24:52 -0500 Subject: [PATCH 04/15] Upgrades some actions versions in Actions python builds --- .github/workflows/python-package.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 56576b1..de79e4c 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -19,9 +19,9 @@ jobs: runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Install dependencies @@ -32,3 +32,4 @@ jobs: - name: Test with pytest run: | pytest tests/ + From 73a36f0bd4885d591f780307ec72400ff403a427 Mon Sep 17 00:00:00 2001 From: Colin Dean Date: Thu, 15 Dec 2022 22:26:11 -0500 Subject: [PATCH 05/15] Drops Python 2.7, 3.5, 3.6 builds from Travis; add 3.12 --- .travis.yml | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5700f46..5d6b468 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,29 +3,20 @@ arch: - ppc64le language: python python: - - "2.7" - - "3.5" - - "3.6" - "3.7" - "3.8" - "3.9" - "3.10" - - "3.11-dev" # development branch - - "pypy" + - "3.11" # development branch + - "3.12-dev" - "pypy3" jobs: exclude: - - arch: ppc64le - python: "2.7" - - arch: ppc64le - python: "pypy" - arch: ppc64le python: "pypy3" - - arch: amd64 - python: "pypy" allow_failures: - - python: "3.10-dev" + - python: "3.12-dev" install: - pip install coveralls tox-travis From 208c2fd56c25de1b7ac7e6687fbe3e0987598d32 Mon Sep 17 00:00:00 2001 From: Colin Dean Date: Thu, 15 Dec 2022 22:31:25 -0500 Subject: [PATCH 06/15] Drops Python older than 3.7 from the rest of things --- pyproject.toml | 2 +- setup.py | 21 ++++----------------- tox.ini | 13 ++++--------- 3 files changed, 9 insertions(+), 27 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index bc940ec..e319856 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.black] line-length = 120 skip-string-normalization = true -target-version = ['py27', 'py34', 'py35', 'py36', 'py37', 'py38', 'py39', 'py310', 'py311'] +target-version = ['py37', 'py38', 'py39', 'py310', 'py311'] include = '\.pyi?$' [tool.isort] diff --git a/setup.py b/setup.py index a071bab..e4f3aaf 100755 --- a/setup.py +++ b/setup.py @@ -169,35 +169,22 @@ def function_three(): 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - '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.11', + 'Programming Language :: Python :: 3.12', 'Topic :: Software Development :: Libraries :: Python Modules', ], extras_require={ 'dev': [ 'tox', - 'PyTest ; python_version >= "3.6"', - 'PyTest < 5 ; python_version < "3.6"', - 'PyTest-Cov ; python_version >= "3.6"', - 'PyTest-Cov < 2.6 ; python_version < "3.6"', + 'PyTest', + 'PyTest-Cov', 'bump2version < 1', 'sphinx < 2', - # Python 2.7 EOL: - 'importlib-metadata < 3 ; python_version < "3"', - 'importlib-resources < 4 ; python_version < "3"', - 'configparser < 5 ; python_version < "3"', - 'sphinxcontrib-websupport < 2 ; python_version < "3"', - 'zipp < 2 ; python_version < "3"', ] }, - python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*', + python_requires='>=3.7', ) diff --git a/tox.ini b/tox.ini index a37b58c..0fbeb89 100644 --- a/tox.ini +++ b/tox.ini @@ -8,22 +8,17 @@ [tox] # PyPy configuration (on Linux/OSX): -# - /usr/local/bin/pypy -> /opt/pypy2.7-v7.3.0-osx64/bin/pypy # - /usr/local/bin/pypy3 -> /opt/pypy3.6-v7.3.0-osx64/bin/pypy3 envlist = - py{27,34,35,36,37,38,39,310,311}-wrapt{1.10,1.11,1.12,1.13} - pypy, pypy3 + py{37,38,39,310,311}-wrapt{1.10,1.11,1.12,1.13} + pypy3 docs [testenv] commands = pytest --cov-report term-missing --cov=deprecated tests/ deps = - py{27,34,35}: pip >= 9.0.3, < 21 - py{27,34}: PyTest < 5 - py{35,36,37,38,39,310,311,py,py3}: PyTest - py{27,34}: PyTest-Cov < 2.6 - py34: typing # required by pytest->attrs - py{35,36,37,38,39,310,311,py,py3}: PyTest-Cov + py{37,38,39,310,311,py,py3}: PyTest + py{37,38,39,310,311,py,py3}: PyTest-Cov wrapt1.10: wrapt ~= 1.10.0 wrapt1.11: wrapt ~= 1.11.0 wrapt1.12: wrapt ~= 1.12.0 From 0d1d0caf05b9e0158a135eac1207bff84a83fdf1 Mon Sep 17 00:00:00 2001 From: Colin Dean Date: Thu, 15 Dec 2022 23:07:26 -0500 Subject: [PATCH 07/15] Split and fix tox config for more better coverage --- tox.ini | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tox.ini b/tox.ini index 0fbeb89..54dffe4 100644 --- a/tox.ini +++ b/tox.ini @@ -10,25 +10,29 @@ # PyPy configuration (on Linux/OSX): # - /usr/local/bin/pypy3 -> /opt/pypy3.6-v7.3.0-osx64/bin/pypy3 envlist = - py{37,38,39,310,311}-wrapt{1.10,1.11,1.12,1.13} - pypy3 + py{37,38,39,310}-wrapt{1.10,1.11,1.12,1.13,1.14} + py{311}-wrapt{1.14} + pypy3.9 docs [testenv] commands = pytest --cov-report term-missing --cov=deprecated tests/ deps = - py{37,38,39,310,311,py,py3}: PyTest - py{37,38,39,310,311,py,py3}: PyTest-Cov + py{37,38,39,310,311,py3.9}: PyTest + py{37,38,39,310,311,py3.9}: PyTest-Cov wrapt1.10: wrapt ~= 1.10.0 wrapt1.11: wrapt ~= 1.11.0 wrapt1.12: wrapt ~= 1.12.0 - wrapt1.13: wrapt == 1.13.0rc3 - coverage < 5 + wrapt1.13: wrapt ~= 1.13.0 + wrapt1.14: wrapt ~= 1.14.0 + coverage [testenv:docs] basepython = python +# jinja2 3.0.3 was the last version to have contextfunction that sphinx 1.x needs deps = sphinx < 2 + jinja2 == 3.0.3 commands = sphinx-build -b html -d {envtmpdir}/doctrees docs/source/ {envtmpdir}/html sphinx-build -b epub -d {envtmpdir}/doctrees docs/source/ {envtmpdir}/epub From 1827126fb1fb8a36073ce00202e4f12afbe5aaaf Mon Sep 17 00:00:00 2001 From: Colin Dean Date: Thu, 15 Dec 2022 23:17:26 -0500 Subject: [PATCH 08/15] Adds importlib-metadata to dev deps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This may need to go into install deps… --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index e4f3aaf..e54fe8b 100755 --- a/setup.py +++ b/setup.py @@ -184,6 +184,7 @@ def function_three(): 'PyTest-Cov', 'bump2version < 1', 'sphinx < 2', + 'importlib-metadata' ] }, python_requires='>=3.7', From fe8014dad6686f455a29164ece4991fb705f17dd Mon Sep 17 00:00:00 2001 From: Colin Dean Date: Thu, 15 Dec 2022 23:20:37 -0500 Subject: [PATCH 09/15] Use newer Travis environment, Focal (Ubuntu 20.04) Also fix error in pypy3 selection --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5d6b468..370aeee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,4 @@ +dist: focal arch: - amd64 - ppc64le @@ -9,11 +10,11 @@ python: - "3.10" - "3.11" # development branch - "3.12-dev" - - "pypy3" + - "pypy3.9" jobs: exclude: - arch: ppc64le - python: "pypy3" + python: "pypy3.9" allow_failures: - python: "3.12-dev" From 0b84709e8365a8359cf4e284ecdca06afa3465b5 Mon Sep 17 00:00:00 2001 From: Colin Dean Date: Thu, 15 Dec 2022 23:52:17 -0500 Subject: [PATCH 10/15] Try installing importlib_metadata for tox run --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 370aeee..c4fbe09 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,7 @@ allow_failures: - python: "3.12-dev" install: - - pip install coveralls tox-travis + - pip install coveralls tox-travis importlib_metadata script: tox after_success: From d5926badfc561a4af279661a57186fd5650a9de0 Mon Sep 17 00:00:00 2001 From: Colin Dean Date: Fri, 16 Dec 2022 00:16:46 -0500 Subject: [PATCH 11/15] Limit tox to <4 on Travis because of outdatedness https://github.com/tox-dev/tox-travis/pull/160 --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c4fbe09..b2a7f9e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,8 @@ allow_failures: - python: "3.12-dev" install: - - pip install coveralls tox-travis importlib_metadata + # TODO: Remove tox limitation when https://github.com/tox-dev/tox-travis/pull/160 + - pip install coveralls tox-travis importlib_metadata 'tox<4' script: tox after_success: From 9aad5c9329dc96d9bf224f94b31fc8a5e4b531e8 Mon Sep 17 00:00:00 2001 From: Colin Dean Date: Fri, 16 Dec 2022 00:40:50 -0500 Subject: [PATCH 12/15] Adds Python 3.12 config to tox --- tox.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index 54dffe4..63efb65 100644 --- a/tox.ini +++ b/tox.ini @@ -11,15 +11,15 @@ # - /usr/local/bin/pypy3 -> /opt/pypy3.6-v7.3.0-osx64/bin/pypy3 envlist = py{37,38,39,310}-wrapt{1.10,1.11,1.12,1.13,1.14} - py{311}-wrapt{1.14} + py{311,312}-wrapt{1.14} pypy3.9 docs [testenv] commands = pytest --cov-report term-missing --cov=deprecated tests/ deps = - py{37,38,39,310,311,py3.9}: PyTest - py{37,38,39,310,311,py3.9}: PyTest-Cov + py{37,38,39,310,311,312,py3.9}: PyTest + py{37,38,39,310,311,312,py3.9}: PyTest-Cov wrapt1.10: wrapt ~= 1.10.0 wrapt1.11: wrapt ~= 1.11.0 wrapt1.12: wrapt ~= 1.12.0 From bc42a86562b939a2da34ec1b96a549de20fbd265 Mon Sep 17 00:00:00 2001 From: Colin Dean Date: Fri, 16 Dec 2022 00:42:15 -0500 Subject: [PATCH 13/15] Use specifically pypy3.9 v7.3.9 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b2a7f9e..3873942 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ python: - "3.10" - "3.11" # development branch - "3.12-dev" - - "pypy3.9" + - "pypy3.9-7.3.9" jobs: exclude: - arch: ppc64le From 97b7e06612858bfc9a1a59725a1c173cde6f6260 Mon Sep 17 00:00:00 2001 From: Colin Dean Date: Fri, 16 Dec 2022 01:02:18 -0500 Subject: [PATCH 14/15] Drop the .9 from pypy3 in tox.ini --- tox.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index 63efb65..52f9290 100644 --- a/tox.ini +++ b/tox.ini @@ -12,14 +12,14 @@ envlist = py{37,38,39,310}-wrapt{1.10,1.11,1.12,1.13,1.14} py{311,312}-wrapt{1.14} - pypy3.9 + pypy3 docs [testenv] commands = pytest --cov-report term-missing --cov=deprecated tests/ deps = - py{37,38,39,310,311,312,py3.9}: PyTest - py{37,38,39,310,311,312,py3.9}: PyTest-Cov + py{37,38,39,310,311,312,py3}: PyTest + py{37,38,39,310,311,312,py3}: PyTest-Cov wrapt1.10: wrapt ~= 1.10.0 wrapt1.11: wrapt ~= 1.11.0 wrapt1.12: wrapt ~= 1.12.0 From e930748172d3581e2cc5d0d686ed90837e528992 Mon Sep 17 00:00:00 2001 From: Colin Dean Date: Fri, 16 Dec 2022 01:23:10 -0500 Subject: [PATCH 15/15] Drops old Pythons and adds newer ones for Appveyor build --- appveyor.yml | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index e8100e8..7a0376e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -5,25 +5,6 @@ version: 1.2.14.{build} environment: matrix: - # Python **2.6** and **3.3** are no more supported - - PYTHON: "C:\\Python27" - TOX_ENV: "py27" - - - PYTHON: "C:\\Python27-x64" - TOX_ENV: "py27" - - - PYTHON: "C:\\Python35" - TOX_ENV: "py35" - - - PYTHON: "C:\\Python35-x64" - TOX_ENV: "py35" - - - PYTHON: "C:\\Python36" - TOX_ENV: "py36" - - - PYTHON: "C:\\Python36-x64" - TOX_ENV: "py36" - - PYTHON: "C:\\Python37" TOX_ENV: "py37" @@ -36,6 +17,24 @@ environment: - PYTHON: "C:\\Python38-x64" TOX_ENV: "py38" + - PYTHON: "C:\\Python39" + TOX_ENV: "py39" + + - PYTHON: "C:\\Python39-x64" + TOX_ENV: "py39" + + - PYTHON: "C:\\Python310" + TOX_ENV: "py310" + + - PYTHON: "C:\\Python310-x64" + TOX_ENV: "py310" + + - PYTHON: "C:\\Python311" + TOX_ENV: "py311" + + - PYTHON: "C:\\Python311-x64" + TOX_ENV: "py311" + init: - set PATH=%PYTHON%;%PYTHON%\Scripts;C:\MinGW\msys\1.0\bin;%PATH% - "git config --system http.sslcainfo \"C:\\Program Files\\Git\\mingw64\\ssl\\certs\\ca-bundle.crt\""