Skip to content

Commit 686a74f

Browse files
committed
Modernize project: drop Python 3.8, add 3.11/3.13/3.14 support
- Update Python version matrix: remove 3.8, add 3.11, 3.13, 3.14 - Update python-version to 3.14 in all GitHub workflows - Update GitHub Actions to latest versions (codecov-action v4 -> v5) - Add Dependabot configuration for automated dependency updates - Add auto-merge workflow for Dependabot PRs - Update pre-commit hooks to latest versions - Replace fix-encoding-pragma with pyupgrade for modern Python syntax - Update mypy configuration (python_version 3.8 -> 3.10) - Update tox environments and base Python to 3.14 - Add python_requires >= 3.10 to setup.cfg - Remove importlib-metadata dependency (not needed for Python 3.10+) - Apply pyupgrade modernizations (remove encoding pragmas, io.open -> open)
1 parent 580c6db commit 686a74f

32 files changed

Lines changed: 66 additions & 51 deletions

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
- package-ecosystem: pip
8+
directory: /
9+
schedule:
10+
interval: weekly

.github/workflows/build.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
golang_version: [1.22.5]
2121
java_version: ['21']
22-
python_version: ['3.8', '3.10', '3.12']
22+
python_version: ['3.10', '3.11', '3.12', '3.13', '3.14']
2323
rust_version: [stable]
2424

2525
env:
@@ -59,7 +59,7 @@ jobs:
5959
run: tox
6060
- name: Upload coverage to Codecov
6161
if: ${{ success() }}
62-
uses: codecov/codecov-action@v4
62+
uses: codecov/codecov-action@v5
6363
with:
6464
env_vars: OS,GOLANG_VERSION,JAVA_VERSION,OS,PYTHON_VERSION,RUST_VERSION
6565

@@ -71,7 +71,7 @@ jobs:
7171
- name: Setup Python
7272
uses: actions/setup-python@v5
7373
with:
74-
python-version: '3.12'
74+
python-version: '3.14'
7575
- name: Install Python dependencies
7676
run: pip install tox
7777
- name: Run Tox

.github/workflows/bump-releases.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup Python
1717
uses: actions/setup-python@v5
1818
with:
19-
python-version: '3.12'
19+
python-version: '3.14'
2020
- name: Configure git configs
2121
run: |
2222
git config --global user.email "macisamuele@users.noreply.github.com"

.github/workflows/bump_external_releases.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
import json
32
import subprocess # nosec B404 B603
43
import sys
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Dependabot Auto-Merge
2+
3+
on: pull_request
4+
5+
permissions:
6+
contents: write
7+
pull-requests: write
8+
9+
jobs:
10+
auto-merge:
11+
runs-on: ubuntu-latest
12+
if: github.actor == 'dependabot[bot]'
13+
steps:
14+
- name: Approve PR
15+
run: gh pr review --approve "$PR_URL"
16+
env:
17+
PR_URL: ${{ github.event.pull_request.html_url }}
18+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
- name: Enable auto-merge
20+
run: gh pr merge --auto --squash "$PR_URL"
21+
env:
22+
PR_URL: ${{ github.event.pull_request.html_url }}
23+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Setup Python
1818
uses: actions/setup-python@v5
1919
with:
20-
python-version: 3.9
20+
python-version: '3.14'
2121
- name: Install Python dependencies
2222
run: pip install wheel
2323
- name: Create a Wheel file and source distribution

.pre-commit-config.yaml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
default_language_version:
2-
python: python3.12
2+
python: python3.14
33

44
repos:
55
- repo: https://github.com/pre-commit/pre-commit
6-
rev: v3.7.1
6+
rev: v4.5.1
77
hooks:
88
- id: validate_manifest
99
- repo: https://github.com/pre-commit/pre-commit-hooks
10-
rev: v4.6.0
10+
rev: v6.0.0
1111
hooks:
1212
- id: check-added-large-files
1313
- id: check-docstring-first
@@ -25,9 +25,8 @@ repos:
2525
files: ^requirements-dev\.txt$
2626
- id: trailing-whitespace
2727
exclude: ^test-data/.*$
28-
- id: fix-encoding-pragma
2928
- repo: https://github.com/asottile/reorder_python_imports
30-
rev: v3.13.0
29+
rev: v3.16.0
3130
hooks:
3231
- id: reorder-python-imports
3332
args:
@@ -37,6 +36,10 @@ repos:
3736
- from __future__ import print_function
3837
- --remove-import
3938
- from __future__ import unicode_literals
39+
- repo: https://github.com/asottile/pyupgrade
40+
rev: v3.21.2
41+
hooks:
42+
- id: pyupgrade
4043
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
4144
rev: v2.13.0
4245
hooks:
@@ -45,24 +48,24 @@ repos:
4548
args:
4649
- --autofix
4750
- repo: https://github.com/ambv/black
48-
rev: 24.4.2
51+
rev: 25.12.0
4952
hooks:
5053
- id: black
5154
args: [--config, .black.toml]
5255
- repo: https://github.com/PyCQA/flake8
53-
rev: 7.1.0
56+
rev: 7.3.0
5457
hooks:
5558
- id: flake8
5659
- repo: https://github.com/pre-commit/mirrors-mypy
57-
rev: v1.10.1
60+
rev: v1.19.1
5861
hooks:
5962
- id: mypy
6063
exclude: ^(\.github/workflows/bump_external_releases\.py)$
6164
additional_dependencies:
6265
- types-requests
6366
- types-setuptools
6467
- repo: https://github.com/PyCQA/bandit
65-
rev: 1.7.9
68+
rev: 1.9.2
6669
hooks:
6770
- id: bandit
6871
exclude: ^tests/.*\.py$

language_formatters_pre_commit_hooks/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
from importlib import metadata
32

43

language_formatters_pre_commit_hooks/pre_conditions.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
import re
32
import typing
43
from functools import wraps

language_formatters_pre_commit_hooks/pretty_format_golang.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
import argparse
32
import sys
43
import typing

0 commit comments

Comments
 (0)