From 709097458cc547be9f61635ee217777b11708458 Mon Sep 17 00:00:00 2001 From: Richard Tibbles Date: Fri, 18 Oct 2024 22:28:45 -0700 Subject: [PATCH] Cleanup version support and test matrix. Add support for Python 3.13. --- .github/workflows/pythontest.yml | 27 +-------------------------- js/package.json | 2 +- requirements-test.txt | 5 ++--- setup.py | 4 ++-- tox.ini | 12 +++++++----- 5 files changed, 13 insertions(+), 37 deletions(-) diff --git a/.github/workflows/pythontest.yml b/.github/workflows/pythontest.yml index 9f74371..a29afbd 100644 --- a/.github/workflows/pythontest.yml +++ b/.github/workflows/pythontest.yml @@ -27,7 +27,7 @@ jobs: strategy: max-parallel: 5 matrix: - python-version: [3.6, 3.7, 3.8, 3.9] + python-version: [3.6, 3.7, 3.8, 3.9, '3.10', '3.11', '3.12', '3.13'] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} @@ -51,28 +51,3 @@ jobs: key: ${{ runner.os }}-tox-py${{ matrix.python-version }}-${{ hashFiles('setup.py') }} - name: Test with tox run: tox -e py${{ matrix.python-version }} - unit_test27: - name: Python unit tests (2.7) - needs: pre_job - runs-on: ubuntu-20.04 - container: - image: python:2.7.18-buster - steps: - - uses: actions/checkout@v4 - - name: Cache pip - uses: actions/cache@v4 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-py2.7-${{ hashFiles('setup.py') }} - - name: Install tox - run: | - python -m pip install --upgrade pip - pip install tox - - name: tox env cache - if: ${{ !startsWith(runner.os, 'windows') }} - uses: actions/cache@v4 - with: - path: ${{ github.workspace }}/.tox/py2.7 - key: ${{ runner.os }}-tox-py2.7-${{ hashFiles('setup.py') }} - - name: Test with tox - run: tox -e py2.7 diff --git a/js/package.json b/js/package.json index e24c21b..633189a 100644 --- a/js/package.json +++ b/js/package.json @@ -27,5 +27,5 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, - "version": "0.2.7" + "version": "0.2.8" } \ No newline at end of file diff --git a/requirements-test.txt b/requirements-test.txt index 21df555..9a551e6 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,4 +1,3 @@ pycountry==17.5.14 -pytest==3.7.1 -attrs==20.3.0 -jsonschema==3.2.0;python_version!="3.4" +pytest==6.2.5 +jsonschema==3.2.0 diff --git a/setup.py b/setup.py index e9b04ff..1cf3c6a 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ setup( name="le-utils", packages=find_packages(), - version="0.2.7", + version="0.2.8", description="LE-Utils contains shared constants used in Kolibri, Ricecooker, and Kolibri Studio.", long_description=long_description, long_description_content_type="text/markdown", @@ -33,5 +33,5 @@ ], author="Learning Equality", author_email="info@learningequality.org", - python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <3.13", + python_requires=">=3.6, <3.14", ) diff --git a/tox.ini b/tox.ini index a2072fc..4af2af9 100644 --- a/tox.ini +++ b/tox.ini @@ -1,17 +1,19 @@ [tox] -envlist = py{2.7,3.4,3.5,3.6,3.7,3.8} +envlist = py{3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13} [testenv] basepython = - py2.7: python2.7 - py3.4: python3.4 - py3.5: python3.5 py3.6: python3.6 py3.7: python3.7 py3.8: python3.8 + py3.9: python3.9 + py3.10: python3.10 + py3.11: python3.11 + py3.12: python3.12 + py3.13: python3.13 deps = -r{toxinidir}/requirements-test.txt setenv = PYTHONPATH = {toxinidir} commands = pip install -U pip - py.test --basetemp={envtmpdir} + pytest --basetemp={envtmpdir}