From 5efed4798370ae5162e2456a3554e46d5babb57e Mon Sep 17 00:00:00 2001 From: Maor Kleinberger Date: Thu, 25 Jul 2024 13:17:08 +0300 Subject: [PATCH] Stop running CI on python3.7 and add 3.12 (#36) * Stop running CI on python3.7 and add 3.12 * Add py312 to tox * Upgrade checkout * Upgrade manylinux version so actions will work --- .github/workflows/tests.yml | 26 +++++++++++++------------- setup.cfg | 1 + tox.ini | 11 ++++++----- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a677ce2..8502a2a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,22 +19,22 @@ jobs: fail-fast: false matrix: container: - - "python:3.7-alpine" - "python:3.8-alpine" - "python:3.9-alpine" - "python:3.10-alpine" - "python:3.11-alpine" + - "python:3.12-alpine" steps: - name: Install packages # gcc and musl-dev needed for compiling the package # git needed for checkout # patchelf needed for auditwheel run: apk add gcc musl-dev git patchelf - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - name: Install dependencies - run: pip install tox==4.6.3 tox-gh==1.2.0 auditwheel==5.1.2 + run: pip install tox==4.16.0 tox-gh==1.3.2 auditwheel==6.0.0 - name: Test with tox run: python -m tox - name: Audit wheel @@ -48,13 +48,13 @@ jobs: test_manylinux: runs-on: ubuntu-latest # Need a relatively modern platform (2014) for the actions themselves to work - container: quay.io/pypa/manylinux2014_x86_64 + container: quay.io/pypa/manylinux_2_28_x86_64 strategy: fail-fast: false matrix: - python-version: [cp37-cp37m, cp38-cp38, cp39-cp39, cp310-cp310, cp311-cp311] + python-version: [cp38-cp38, cp39-cp39, cp310-cp310, cp311-cp311, cp312-cp312] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - name: Set up Python @@ -62,7 +62,7 @@ jobs: echo "/opt/python/${{ matrix.python-version }}/bin" >> $GITHUB_PATH echo $PATH - name: Install dependencies - run: pip install tox==4.6.3 tox-gh==1.2.0 + run: pip install tox==4.16.0 tox-gh==1.3.2 - name: Test wheel with tox run: python -m tox - name: Audit wheel @@ -78,10 +78,10 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] arch: [x86, x64] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - name: Set up Python @@ -90,7 +90,7 @@ jobs: python-version: ${{ matrix.python-version }} architecture: ${{ matrix.arch }} - name: Install dependencies - run: pip install tox==4.6.3 tox-gh==1.2.0 + run: pip install tox==4.16.0 tox-gh==1.3.2 - name: Test with tox run: python -m tox - name: Upload wheel @@ -104,9 +104,9 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ "3.11" ] + python-version: [ "3.11", "3.12" ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - name: Set up Python @@ -114,7 +114,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Install dependencies - run: pip install tox==4.6.3 + run: pip install tox==4.16.0 tox-gh==1.3.2 - name: Test with tox run: sudo python -m tox -e sdist - name: Upload dist diff --git a/setup.cfg b/setup.cfg index 2e0cd36..259b471 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,4 +24,5 @@ classifiers = 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 diff --git a/tox.ini b/tox.ini index ff86503..a4b2780 100644 --- a/tox.ini +++ b/tox.ini @@ -1,11 +1,12 @@ [tox] -envlist = py37,py38,py39,py310,py311,sdist,lint +envlist = py37,py38,py39,py310,py311,py312,sdist,lint requires = tox>4 [gh] python = - 3.11 = py311, sdist, lint + 3.12 = py312, sdist, lint + 3.11 = py311 3.10 = py310 3.9 = py39 3.8 = py38 @@ -14,7 +15,7 @@ python = [testenv] package = wheel deps = - pytest==7.4.0 + pytest==8.3.1 ./tests/injection commands = pytest tests {posargs} @@ -23,7 +24,7 @@ package = sdist [testenv:lint] deps = - mypy==1.4.1 + mypy==1.11.0 # For linting tests - pytest==7.4.0 + pytest==8.3.1 commands = mypy tests pyinjector --exclude tests/injection