From 50119d658ab48021cad234fc5c8d3253263b2ec0 Mon Sep 17 00:00:00 2001 From: csteiner <47841949+clintonsteiner@users.noreply.github.com> Date: Mon, 6 Jan 2025 14:58:21 -0600 Subject: [PATCH] update: add python 3.13 support (#900) * update: add python 3.13 support * tox: add in python 3.13 * ci: add in fixes causing failing ci * requirements: remove typed-ast as EOL as of python 3.7 * pre-commit: bump to work with new python version * pre-commit: other fixes * pre-commit: remove add trailing comma - conflicts with autopep8 * pre-commit: fix duplicated autopep8 repo * Revert "pre-commit: remove add trailing comma - conflicts with autopep8" This reverts commit 853c465ad10d6f9c15a05b880a357c443becefb0. --- .github/workflows/ci.yml | 6 +++--- .github/workflows/pypi.yml | 12 ++++++------ .pre-commit-config.yaml | 11 +++++++---- requirements-dev.txt | 1 - tox.ini | 2 +- 5 files changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 23a5cc9ca..bca707dc3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,10 +17,10 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python: ['3.9', '3.10', '3.11', '3.12'] + python: ['3.9', '3.10', '3.11', '3.12', '3.13'] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} - run: python -m pip install --upgrade setuptools pip tox virtualenv diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 325eb392e..0f4c082a7 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -15,10 +15,10 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest] - python: ['3.9', '3.10', '3.11', '3.12'] + python: ['3.9', '3.10', '3.11', '3.12', '3.13'] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} - run: python -m pip install --upgrade setuptools pip tox virtualenv @@ -32,11 +32,11 @@ jobs: needs: tox runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.13 - name: Install dependencies run: pip install wheel - name: Build package diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 87078a5de..368688eaf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.3.0 + rev: v5.0.0 hooks: - id: check-builtin-literals args: ['--no-allow-dict-kwargs'] @@ -11,10 +11,13 @@ repos: - id: double-quote-string-fixer - id: end-of-file-fixer - id: name-tests-test + - id: trailing-whitespace +- repo: https://github.com/PyCQA/flake8 + rev: 7.1.1 + hooks: - id: flake8 args: ['--max-line-length', '100'] exclude: ^test_data/|bumpity.py$ - - id: trailing-whitespace - repo: https://github.com/asottile/reorder_python_imports rev: v1.6.1 hooks: @@ -25,8 +28,8 @@ repos: rev: v1.4.1 hooks: - id: add-trailing-comma -- repo: https://github.com/pre-commit/mirrors-autopep8 - rev: v1.4.4 +- repo: https://github.com/hhatto/autopep8 + rev: v2.3.1 hooks: - id: autopep8 - repo: local diff --git a/requirements-dev.txt b/requirements-dev.txt index 9cb1527f0..5f27fd029 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -33,7 +33,6 @@ six==1.16.0 toml==0.10.2 tox==4.23.2 tox-pip-extensions==1.6.0 -typed-ast==1.5.5 types-PyYAML==6.0.12.12 types-requests==2.31.0.20240106 typing-extensions==4.12.2 diff --git a/tox.ini b/tox.ini index 350300941..9a051fdb7 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] project = detect_secrets # These should match the ci python env list -envlist = py{39,310,311,312},mypy +envlist = py{39,310,311,312,313},mypy skip_missing_interpreters = true [testenv]