Skip to content

Commit f8da7e4

Browse files
authored
Update supported python versions: add 3.15, remove 3.10 (#731)
* Update range of supported pythons: 3.11 - 3.15 Drop 3.10, add 3.15. Minor other cleanup is included. * Update pyupgrade version bound to 3.11+ * Update GHA with new python version range * Update changelog with new version range
1 parent 00e7fdb commit f8da7e4

10 files changed

Lines changed: 24 additions & 29 deletions

File tree

‎.github/workflows/build.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
py: ["3.x"]
1212
include:
1313
- toxenv: py-mindeps
14-
py: "3.10"
14+
py: "3.11"
1515

1616
runs-on: ubuntu-latest
1717
timeout-minutes: 5
@@ -64,7 +64,7 @@ jobs:
6464
strategy:
6565
matrix:
6666
os: [ubuntu, windows, macos]
67-
py: ['3.10', '3.11', '3.12', '3.13', '3.14']
67+
py: ['3.11', '3.12', '3.13', '3.14', '3.15']
6868
name: "Test on ${{ matrix.os }}, py${{ matrix.py }}"
6969
runs-on: "${{ matrix.os }}-latest"
7070
timeout-minutes: 5

‎.github/workflows/publish_to_pypi.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- uses: actions/checkout@v7
1414
- uses: actions/setup-python@v7
1515
with:
16-
python-version: "3.11"
16+
python-version: "3.15"
1717

1818
- run: python -m pip install build twine
1919

‎.github/workflows/publish_to_test_pypi.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- uses: actions/checkout@v7
2121
- uses: actions/setup-python@v7
2222
with:
23-
python-version: "3.11"
23+
python-version: "3.15"
2424

2525
- run: python -m pip install build twine
2626

‎.pre-commit-config.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ repos:
4848
rev: v3.21.2
4949
hooks:
5050
- id: pyupgrade
51-
args: ["--py310-plus"]
51+
args: ["--py311-plus"]

‎CHANGELOG.rst‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ Unreleased
1010

1111
.. vendor-insert-here
1212
13+
- Added support for Python 3.15 .
14+
- Removed support for Python 3.10 .
15+
1316
0.38.2
1417
------
1518

‎justfile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
set lazy
12
version := `uvx mddj read version`
23
push_remote := `git rev-parse --abbrev-ref @{push} | cut -d '/' -f1`
34

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ classifiers = [
3535
"License :: OSI Approved :: Apache Software License",
3636
"Programming Language :: Python :: 3",
3737
]
38-
requires-python = ">=3.10"
38+
requires-python = ">=3.11"
3939
dependencies = [
4040
'tomli>=2.0;python_version<"3.11"',
4141
"ruamel.yaml>=0.18.10,<0.20.0",

‎src/check_jsonschema/file_wrapper.py‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@
2020
import types
2121
import typing as t
2222

23-
if sys.version_info >= (3, 11):
24-
from typing import Self
25-
else:
26-
from typing_extensions import Self
27-
2823

2924
class BinaryFileInput:
3025
def __init__(self, name: str) -> None:
@@ -65,7 +60,7 @@ def __getattr__(self, name: str) -> t.Any:
6560
def __repr__(self) -> str:
6661
return "BinaryFileInput(filename={self.filename!r})"
6762

68-
def __enter__(self) -> Self:
63+
def __enter__(self) -> t.Self:
6964
return self
7065

7166
def __exit__(

‎src/check_jsonschema/parsers/toml.py‎

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
from __future__ import annotations
22

33
import datetime
4-
import sys
4+
import tomllib
55
import typing as t
66

7-
if sys.version_info < (3, 11):
8-
import tomli as toml_implementation
9-
else:
10-
import tomllib as toml_implementation
11-
127

138
def _normalize(data: t.Any) -> t.Any:
149
"""
@@ -47,9 +42,9 @@ def _normalize(data: t.Any) -> t.Any:
4742
return data
4843

4944

50-
ParseError: type[Exception] = toml_implementation.TOMLDecodeError
45+
ParseError: type[Exception] = tomllib.TOMLDecodeError
5146

5247

5348
def load(stream: t.IO[bytes]) -> t.Any:
54-
data = toml_implementation.load(stream)
49+
data = tomllib.load(stream)
5550
return _normalize(data)

‎tox.ini‎

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
envlist =
33
mypy
44
cov_clean
5-
py310-mindeps{,-format}
6-
py{314,313,312,311,310}
7-
py{310,314}-{json5,pyjson5}{,-format}
8-
py{310,314}-{disable_orjson}
5+
py3.11-mindeps{,-format}
6+
py{3.15,3.14,3.13,3.12,3.11}
7+
py{3.11,3.15}-{json5,pyjson5}{,-format}
8+
py{3.11,3.15}-disable_orjson
99
cov_combine
1010
cov_report
1111
skip_missing_interpreters = true
@@ -16,14 +16,15 @@ labels =
1616

1717
[testenv]
1818
description = "run tests with pytest"
19-
usedevelop = true
19+
package = wheel
20+
wheel_build_env = build_wheel
2021
dependency_groups = dev
2122
deps =
2223
# attrs v23.2.0 is needed for mindeps because jsonschema==4.18.0
23-
# is uses `hash=True` which was deprecated after this version
24+
# uses `hash=True` which was deprecated after this version
2425
mindeps: attrs==23.2.0
2526
mindeps: jsonschema==4.18.0
26-
mindeps: click==8.0.0
27+
mindeps: click==8.5.0
2728
mindeps: requests==2.0.0
2829
!disable_orjson: orjson
2930
json5: json5
@@ -45,7 +46,7 @@ description = "combine coverage data"
4546
deps = coverage
4647
skip_install = true
4748
commands = coverage combine
48-
depends = py{,310,311,312,313,314}{,-mindeps,-format,-json5,-pyjson5,-disable_orjson}
49+
depends = py{,3.11,3.12,3.13,3.14,3.15}{,-mindeps,-format,-json5,-pyjson5,-disable_orjson}
4950

5051
[testenv:cov_report]
5152
description = "report test coverage"
@@ -72,7 +73,7 @@ commands = pyright src/ {posargs}
7273

7374
[testenv:docs]
7475
description = "build docs with sphinx"
75-
basepython = python3.10
76+
basepython = python3.13
7677
dependency_groups = docs
7778
allowlist_externals = rm
7879
changedir = docs/

0 commit comments

Comments
 (0)