Skip to content

Commit 01fa968

Browse files
rh0diumclaude
andauthored
Update for Python 3.14 and Django 6.0 readiness (#4)
* Update for Python 3.14 and Django 6.0 readiness - Update pyproject.toml classifiers for Python 3.12/3.13/3.14 and Django 5.2/6.0 - Update requires-python to >=3.12 - Modernize ruff configuration with proper lint and format sections - Update black target-version to py312 - Update pre-commit hooks to v5.0.0 and ruff to v0.8.3 - Update GitHub CI test matrix for Python 3.12/3.13/3.14 and Django 5.2/6.0 - Add continue-on-error for Django 6.0 and Python 3.14 in CI - Run ruff format to fix formatting 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Update CI workflow: remove Black/pre-commit, add merge queue support - Add merge_group trigger for merge queue support - Remove redundant Black and pre-commit jobs - Update Ruff job to include both format and lint checks - Rename job to "Ruff Format" for clarity - Add always() pattern to release job to prevent skip propagation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent d541988 commit 01fa968

File tree

4 files changed

+39
-59
lines changed

4 files changed

+39
-59
lines changed

.github/workflows/main.yml

Lines changed: 15 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Bootstrap Template Tags Tests
22

33
on:
44
push:
5+
merge_group:
56
schedule:
67
- cron: '0 1 * * 5'
78

@@ -29,27 +30,8 @@ jobs:
2930
- name: outdated
3031
run: pip list --outdated --not-required --user | grep . && echo "There are outdated packages" && exit 1 || echo "All packages up to date"
3132

32-
black:
33-
name: Black
34-
runs-on: ubuntu-latest
35-
steps:
36-
- uses: actions/checkout@v4
37-
- uses: actions/setup-python@v5
38-
with:
39-
python-version: "3.13"
40-
cache: 'pip'
41-
42-
- name: Install dependencies
43-
run: |
44-
python -m pip install --upgrade pip
45-
pip install .
46-
pip install .[test]
47-
48-
- name: Black
49-
run: black --check .
50-
5133
ruff:
52-
name: Ruff
34+
name: Ruff Format
5335
runs-on: ubuntu-latest
5436
steps:
5537
- uses: actions/checkout@v4
@@ -64,28 +46,11 @@ jobs:
6446
pip install .
6547
pip install .[test]
6648
67-
- name: Ruff
68-
run: ruff check
49+
- name: Ruff Format Check
50+
run: ruff format --check .
6951

70-
pre-commit:
71-
name: Pre-Commit
72-
runs-on: ubuntu-latest
73-
steps:
74-
- uses: actions/checkout@v4
75-
- uses: actions/setup-python@v5
76-
with:
77-
python-version: "3.13"
78-
cache: 'pip'
79-
80-
- name: Install dependencies
81-
run: |
82-
python -m pip install --upgrade pip
83-
pip install .
84-
pip install .[test]
85-
pre-commit install
86-
87-
- name: Pre-Commit
88-
run: pre-commit run --all-files --show-diff-on-failure
52+
- name: Ruff Lint Check
53+
run: ruff check
8954

9055
security:
9156
name: Bandit Security
@@ -119,13 +84,16 @@ jobs:
11984
tests:
12085
name: Python ${{ matrix.python-version }} / ${{ matrix.db }} / Django ${{ matrix.django-version}}
12186
runs-on: ubuntu-latest
122-
# continue-on-error: ${{ matrix.django-version == '~=5.0' }}
87+
continue-on-error: ${{ matrix.django-version == '~=6.0' || matrix.python-version == '3.14' }}
12388
strategy:
124-
max-parallel: 4
89+
max-parallel: 6
12590
matrix:
12691
db: [ sqlite, mariadb ]
127-
django-version: [ "~=5.0" ]
128-
python-version: ["3.12", "3.13" ]
92+
django-version: [ "~=5.2", "~=6.0" ]
93+
python-version: ["3.12", "3.13", "3.14" ]
94+
exclude:
95+
- python-version: "3.12"
96+
django-version: "~=6.0"
12997

13098
services:
13199
mariadb:
@@ -213,8 +181,8 @@ jobs:
213181
release:
214182
name: Release
215183
runs-on: ubuntu-latest
216-
needs: ['outdated', 'black', 'pre-commit', 'security', 'tests', 'coverage']
217-
if: github.ref == 'refs/heads/master' # Only run on master
184+
needs: ['outdated', 'ruff', 'security', 'tests', 'coverage']
185+
if: always() && github.ref == 'refs/heads/master' && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
218186
permissions: write-all
219187
outputs:
220188
bumped: ${{ steps.release.outputs.bumped }}

.pre-commit-config.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ default_language_version:
22
python: python3.13
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v4.0.1
5+
rev: v5.0.0
66
hooks:
77
- id: check-added-large-files
88
args: [ '--maxkb=500' ]
@@ -20,11 +20,8 @@ repos:
2020
exclude: .idea/.*
2121
- id: check-json
2222
- repo: https://github.com/astral-sh/ruff-pre-commit
23-
# Ruff version.
24-
rev: v0.7.3
23+
rev: v0.8.3
2524
hooks:
26-
# Run the linter.
2725
- id: ruff
2826
args: [ --fix ]
29-
# Run the formatter.
3027
- id: ruff-format

bootstrap_templatetags/templatetags/bootstrap_tags.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def group(self, context, nodelist, heading, style="default"):
9999
import warnings
100100

101101
warnings.warn(
102-
"The bootstrap_accordion's {% group %} tag is deprecated; use {% panel %}" " instead",
102+
"The bootstrap_accordion's {% group %} tag is deprecated; use {% panel %} instead",
103103
DeprecationWarning,
104104
)
105105
return self.panel(context, nodelist, heading, style=style)

pyproject.toml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name = "django-bootstrap-templatetags"
77
dynamic = ["version"]
88
description = "Vanilla Bootstrap structures in simple rendering blocks"
99
readme = "README.md"
10-
requires-python = ">=3.11"
10+
requires-python = ">=3.12"
1111
authors = [
1212
{ name = "Pivotal Energy Solutions", email = "steve@pivotal.energy" },
1313
]
@@ -18,18 +18,19 @@ classifiers = [
1818
"Development Status :: 5 - Production/Stable",
1919
"Environment :: Web Environment",
2020
"Framework :: Django",
21-
"Framework :: Django :: 5.0",
21+
"Framework :: Django :: 5.2",
22+
"Framework :: Django :: 6.0",
2223
"Intended Audience :: Developers",
2324
"License :: OSI Approved :: Apache Software License",
2425
"Operating System :: OS Independent",
2526
"Programming Language :: Python",
26-
"Programming Language :: Python :: 3.11",
2727
"Programming Language :: Python :: 3.12",
2828
"Programming Language :: Python :: 3.13",
29+
"Programming Language :: Python :: 3.14",
2930
"Topic :: Utilities",
3031
]
3132
dependencies = [
32-
"django>=5.0",
33+
"django>=5.2",
3334
]
3435

3536
[project.optional-dependencies]
@@ -73,13 +74,27 @@ include = [
7374

7475
[tool.black]
7576
line-length = 100
76-
target-version = ['py311']
77+
target-version = ['py312']
7778
include = '\.pyi?$'
7879
exclude = '(\.git|.venv|_build|build|dist|.*\/__pycache__\/)'
7980

8081
[tool.ruff]
82+
exclude = [".bzr", ".direnv", ".eggs", ".git", ".mypy_cache", ".nox", ".pytype", ".ruff_cache", ".svn", ".tox", ".venv", "__pypackages__", "_build", "build", "dist", "node_modules"]
8183
line-length = 100
82-
lint.ignore = ["F401"]
84+
indent-width = 4
85+
target-version = "py312"
86+
87+
[tool.ruff.lint]
88+
ignore = ["F401", "E402"]
89+
fixable = ["ALL"]
90+
unfixable = []
91+
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
92+
93+
[tool.ruff.format]
94+
quote-style = "double"
95+
indent-style = "space"
96+
skip-magic-trailing-comma = false
97+
line-ending = "auto"
8398

8499
[tool.bandit]
85100
targets = ['bootstrap_templatetags']

0 commit comments

Comments
 (0)