From f4627fb8156127601fabc07991054702e83a26c5 Mon Sep 17 00:00:00 2001 From: Jordan Webb Date: Mon, 5 Aug 2024 15:25:14 -0500 Subject: [PATCH] Drop Python 3.7 support, add Python 3.12 support --- .github/workflows/build_wheels.yml | 12 +++++++----- .github/workflows/test.yml | 4 ++-- scripts/install-go.sh | 4 ++-- setup.cfg | 15 ++++++--------- 4 files changed, 17 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 9bcaf60..9d8a83a 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -20,12 +20,12 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.10" + python-version: "3.12" - name: Build sdist run: | - python3.10 -m pip install --upgrade wheel - python3.10 setup.py sdist + python3.12 -m pip install --upgrade setuptools wheel + python3.12 setup.py sdist - uses: actions/upload-artifact@v3 with: @@ -40,7 +40,7 @@ jobs: matrix: # Windows isn't working right now: https://github.com/caketop/python-starlark-go/issues/4 os: [ubuntu-latest, macos-latest] - cibw_python: ["cp37-*", "cp38-*", "cp39-*", "cp310-*", "cp311-*"] + cibw_python: ["cp38-*", "cp39-*", "cp310-*", "cp311-*", "cp312-*", "cp313-*"] cibw_arch: ["i686", "x86_64", "aarch64", "arm64"] include: - cibw_arch: arm64 @@ -66,6 +66,8 @@ jobs: fetch-depth: 0 - uses: actions/setup-go@v5 + with: + go-version: 'stable' if: runner.os != 'Linux' - name: Set up QEMU @@ -73,7 +75,7 @@ jobs: uses: docker/setup-qemu-action@v3.0.0 - name: Build wheels - uses: pypa/cibuildwheel@v2.13.1 + uses: pypa/cibuildwheel@v2.20.0 env: CIBW_BUILD_VERBOSITY: 1 CIBW_BUILD: ${{ matrix.cibw_python }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6139d51..ddcf149 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,10 +10,10 @@ jobs: strategy: 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'] experimental: [false] include: - - python-version: '3.12-dev' + - python-version: '3.13-dev' # sets continue-on-error automatically experimental: true diff --git a/scripts/install-go.sh b/scripts/install-go.sh index c833eff..8267bed 100755 --- a/scripts/install-go.sh +++ b/scripts/install-go.sh @@ -2,7 +2,7 @@ set -ex -GO_VERSION=1.20.2 +GO_VERSION=1.22.5 if [ -e /etc/alpine-release ] && [ -z "$BASH_VERSION" ]; then apk add bash curl git go @@ -21,7 +21,7 @@ if [ -e /etc/debian_version ]; then fi install_go() { - git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.10.0 + git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.0 # shellcheck disable=SC1090 . ~/.asdf/asdf.sh diff --git a/setup.cfg b/setup.cfg index c41d005..28d25f0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -18,18 +18,19 @@ classifiers = Intended Audience :: Developers License :: OSI Approved :: Apache Software License Programming Language :: Python :: 3 :: Only - 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 + Programming Language :: Python :: 3.13 [options] packages = find: package_dir = = src include_package_data = True -python_requires = >= 3.7 +python_requires = >= 3.8 setup_requires = setuptools_scm[toml] >= 3.4 setuptools-golang >= 2.7 @@ -43,16 +44,16 @@ starlark_go = py.typed [tox:tox] -envlist = py37, py38, py39, py310, py311, py312 +envlist = py38, py39, py310, py311, py312, py313 [gh-actions] python = - 3.7: py37 3.8: py38 3.9: py39 3.10: py310 3.11: py311 3.12: py312 + 3.13: py313 [testenv] deps = @@ -60,11 +61,7 @@ deps = pytest-memray commands = pytest -v --memray {posargs} -[testenv:py37] -deps = -r development.txt -commands = pytest -v {posargs} - -[testenv:py312] +[testenv:py313] deps = -r development.txt commands = pytest -v {posargs}