From a96023577e71dfeadb552b139ccf3cd3f6adf0a8 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 3 Apr 2022 20:59:38 +0300 Subject: [PATCH 1/4] Add support for Python 3.9 and 3.10 --- .appveyor.yml | 6 +++++- .github/workflows/python-tox.yml | 9 ++++++--- .travis.yml | 3 ++- setup.py | 2 ++ 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index a1a3e347..8af60b9b 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,4 +1,4 @@ -# To activate, change the Appveyor settings to use `.appveyor.yml`. +image: Visual Studio 2019 environment: global: PATH: "C:\\Python27\\Scripts\\;%PATH%" @@ -13,6 +13,10 @@ environment: - TOXENV: py37-optional - TOXENV: py38-base - TOXENV: py38-optional + - TOXENV: py39-base + - TOXENV: py39-optional + - TOXENV: py310-base + - TOXENV: py310-optional install: - git submodule update --init --recursive diff --git a/.github/workflows/python-tox.yml b/.github/workflows/python-tox.yml index ec5cf636..e1b5931d 100644 --- a/.github/workflows/python-tox.yml +++ b/.github/workflows/python-tox.yml @@ -6,15 +6,18 @@ jobs: if: github.event.push || github.event.pull_request.head.repo.full_name != github.repository runs-on: ubuntu-latest strategy: + fail-fast: false matrix: - python: [2.7, 3.5, 3.6, 3.7, 3.8, pypy-2.7, pypy3] + python: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "pypy-2.7", "pypy-3.8"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v3 with: python-version: ${{ matrix.python }} + cache: pip + cachr-dependency-path: "requirements*" - run: pip install tox - run: tox -e py - if: ${{ always() }} diff --git a/.travis.yml b/.travis.yml index d2d9e30e..780df9a2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,12 +2,13 @@ language: python python: - "pypy3" - "pypy" + - "3.10" + - "3.9" - "3.8" - "3.7" - "3.6" - "3.5" - "2.7" - - "3.9-dev" cache: pip diff --git a/setup.py b/setup.py index f84c1284..97d39e12 100644 --- a/setup.py +++ b/setup.py @@ -70,6 +70,8 @@ def default_environment(): '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 :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Software Development :: Libraries :: Python Modules', From e42650d4d1fcd60a180f958c6bcdb4c1336a4bd7 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 3 Apr 2022 22:24:19 +0300 Subject: [PATCH 2/4] pytest: drop the dot https://twitter.com/pytestdotorg/status/753767547866972160 --- CHANGES.rst | 2 +- README.rst | 2 +- tox.ini | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 0f6314aa..3ed63a96 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -95,7 +95,7 @@ Released on July 14, 2016 tested, doesn't entirely work, and as far as I can tell is completely unused by anyone.** -* Move testsuite to ``py.test``. +* Move testsuite to ``pytest``. * **Fix #124: move to webencodings for decoding the input byte stream; this makes html5lib compliant with the Encoding Standard, and diff --git a/README.rst b/README.rst index d367905d..072861ab 100644 --- a/README.rst +++ b/README.rst @@ -128,7 +128,7 @@ Tests ----- Unit tests require the ``pytest`` and ``mock`` libraries and can be -run using the ``py.test`` command in the root directory. +run using the ``pytest`` command in the root directory. Test data are contained in a separate `html5lib-tests `_ repository and included diff --git a/tox.ini b/tox.ini index 16b8cf41..12f76519 100644 --- a/tox.ini +++ b/tox.ini @@ -12,7 +12,7 @@ passenv = COVERAGE_RUN_OPTIONS commands = six19: pip install six==1.9 - {env:PYTEST_COMMAND:{envbindir}/py.test} {posargs} + {env:PYTEST_COMMAND:{envbindir}/pytest} {posargs} flake8 {toxinidir} [testenv:doc] From 9ee05d299dd7e23708946506eadcaef943538559 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Fri, 7 Oct 2022 20:28:11 +0300 Subject: [PATCH 3/4] Fix typo, tighten wildcard --- .github/workflows/python-tox.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-tox.yml b/.github/workflows/python-tox.yml index e1b5931d..b5bbc40e 100644 --- a/.github/workflows/python-tox.yml +++ b/.github/workflows/python-tox.yml @@ -17,7 +17,7 @@ jobs: with: python-version: ${{ matrix.python }} cache: pip - cachr-dependency-path: "requirements*" + cache-dependency-path: "requirements*.txt" - run: pip install tox - run: tox -e py - if: ${{ always() }} From 0dae7eaaa437f118675c532e98420771767ef5e9 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Thu, 22 Dec 2022 12:32:17 +0200 Subject: [PATCH 4/4] Add support for Python 3.11 --- .github/workflows/python-tox.yml | 4 ++-- setup.py | 1 + tox.ini | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-tox.yml b/.github/workflows/python-tox.yml index b5bbc40e..78f7fdc3 100644 --- a/.github/workflows/python-tox.yml +++ b/.github/workflows/python-tox.yml @@ -8,12 +8,12 @@ jobs: strategy: fail-fast: false matrix: - python: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "pypy-2.7", "pypy-3.8"] + python: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "pypy-2.7", "pypy-3.8"] steps: - uses: actions/checkout@v3 with: submodules: true - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} cache: pip diff --git a/setup.py b/setup.py index 97d39e12..b4c11811 100644 --- a/setup.py +++ b/setup.py @@ -72,6 +72,7 @@ def default_environment(): 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Software Development :: Libraries :: Python Modules', diff --git a/tox.ini b/tox.ini index 12f76519..42790f48 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{27,35,36,37,38,py,py3}-{base,six19,optional} +envlist = py{27,35,36,37,38,39,310,311,py,py3}-{base,six19,optional} [testenv] deps =