Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d15e7c7

Browse files
authored
Add support for Python 3.13, drop support for 3.8 (#35)
1 parent 7c6ad27 commit d15e7c7

11 files changed

Lines changed: 64 additions & 70 deletions

File tree

.github/workflows/lint.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v4
11-
- name: Set up Python 3.11
11+
- name: Set up Python 3.13
1212
uses: actions/setup-python@v5
1313
with:
14-
python-version: "3.11"
14+
python-version: '3.13'
1515
- name: Install dependencies
1616
run: |
1717
pip install uv
@@ -24,10 +24,10 @@ jobs:
2424
runs-on: ubuntu-latest
2525
steps:
2626
- uses: actions/checkout@v4
27-
- name: Set up Python 3.11
27+
- name: Set up Python 3.13
2828
uses: actions/setup-python@v5
2929
with:
30-
python-version: "3.11"
30+
python-version: '3.13'
3131
- name: Install dependencies
3232
run: |
3333
pip install uv

.github/workflows/tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v4
11-
- name: Set up Python 3.12
11+
- name: Set up Python 3.13
1212
uses: actions/setup-python@v5
1313
with:
14-
python-version: '3.12'
14+
python-version: '3.13'
1515
- name: Install dependencies
1616
run: |
1717
pip install uv
@@ -24,7 +24,7 @@ jobs:
2424
runs-on: ubuntu-latest
2525
strategy:
2626
matrix:
27-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
27+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
2828

2929
steps:
3030
- uses: actions/checkout@v4
@@ -45,10 +45,10 @@ jobs:
4545

4646
steps:
4747
- uses: actions/checkout@v4
48-
- name: Set up Python 3.12
48+
- name: Set up Python 3.13
4949
uses: actions/setup-python@v5
5050
with:
51-
python-version: '3.12'
51+
python-version: '3.13'
5252
- name: Install dependencies
5353
run: |
5454
pip install uv

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
sys.path.insert(0, str(Path(__file__).parents[2] / "src"))
1212

1313
project = "python-jsonlogic"
14-
copyright = "2024, Victorien"
14+
copyright = "2024-%Y, Victorien"
1515
author = "Victorien"
1616
release = "0.1.0"
1717

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ classifiers = [
1515
"Operating System :: OS Independent",
1616
"Programming Language :: Python :: 3",
1717
"Programming Language :: Python :: 3 :: Only",
18-
"Programming Language :: Python :: 3.8",
1918
"Programming Language :: Python :: 3.9",
2019
"Programming Language :: Python :: 3.10",
2120
"Programming Language :: Python :: 3.11",
2221
"Programming Language :: Python :: 3.12",
22+
"Programming Language :: Python :: 3.13",
2323
"Typing :: Typed",
2424
"License :: OSI Approved :: MIT License",
2525
"Intended Audience :: Developers",
@@ -43,7 +43,7 @@ where = ["src"]
4343
[tool.ruff]
4444
line-length = 120
4545
src = ["src"]
46-
target-version = "py38"
46+
target-version = "py39"
4747

4848
[tool.ruff.lint]
4949
typing-modules = ["jsonlogic._compat"]

requirements/requirements-dev.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
#
2-
# This file is autogenerated by pip-compile with Python 3.12
3-
# by the following command:
4-
#
5-
# pip-compile requirements/requirements-dev.in
6-
#
7-
nodeenv==1.9.0
1+
# This file was autogenerated by uv via the following command:
2+
# uv pip compile requirements/requirements-dev.in -o requirements/requirements-dev.txt
3+
nodeenv==1.9.1
84
# via pyright
9-
pyright==1.1.365
5+
pyright==1.1.392.post0
106
# via -r requirements/requirements-dev.in
11-
ruff==0.6.8
7+
ruff==0.9.3
128
# via -r requirements/requirements-dev.in
9+
typing-extensions==4.12.2
10+
# via
11+
# -c requirements/requirements.txt
12+
# pyright

requirements/requirements-docs.txt

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
1-
#
2-
# This file is autogenerated by pip-compile with Python 3.12
3-
# by the following command:
4-
#
5-
# pip-compile requirements/requirements-docs.in
6-
#
7-
alabaster==0.7.16
1+
# This file was autogenerated by uv via the following command:
2+
# uv pip compile requirements/requirements-docs.in -o requirements/requirements-docs.txt
3+
alabaster==1.0.0
84
# via sphinx
9-
babel==2.15.0
5+
babel==2.16.0
106
# via sphinx
117
beautifulsoup4==4.12.3
128
# via furo
13-
certifi==2024.6.2
9+
certifi==2024.12.14
1410
# via requests
15-
charset-normalizer==3.3.2
11+
charset-normalizer==3.4.1
1612
# via requests
1713
docutils==0.21.2
1814
# via
@@ -24,27 +20,27 @@ idna==3.10
2420
# via requests
2521
imagesize==1.4.1
2622
# via sphinx
27-
jinja2==3.1.4
23+
jinja2==3.1.5
2824
# via sphinx
29-
markupsafe==2.1.5
25+
markupsafe==3.0.2
3026
# via jinja2
31-
packaging==24.1
27+
packaging==24.2
3228
# via sphinx
3329
polib==1.2.0
3430
# via sphinx-lint
35-
pygments==2.18.0
31+
pygments==2.19.1
3632
# via
3733
# furo
3834
# sphinx
39-
regex==2024.5.15
35+
regex==2024.11.6
4036
# via sphinx-lint
4137
requests==2.32.3
4238
# via sphinx
4339
snowballstemmer==2.2.0
4440
# via sphinx
45-
soupsieve==2.5
41+
soupsieve==2.6
4642
# via beautifulsoup4
47-
sphinx==8.0.2
43+
sphinx==8.1.3
4844
# via
4945
# -r requirements/requirements-docs.in
5046
# furo
@@ -68,5 +64,5 @@ sphinxcontrib-qthelp==2.0.0
6864
# via sphinx
6965
sphinxcontrib-serializinghtml==2.0.0
7066
# via sphinx
71-
urllib3==2.2.3
67+
urllib3==2.3.0
7268
# via requests

requirements/requirements-test.txt

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,22 @@
1-
#
2-
# This file is autogenerated by pip-compile with Python 3.12
3-
# by the following command:
4-
#
5-
# pip-compile requirements/requirements-test.in
6-
#
7-
cachetools==5.5.0
1+
# This file was autogenerated by uv via the following command:
2+
# uv pip compile requirements/requirements-test.in -o requirements/requirements-test.txt
3+
cachetools==5.5.1
84
# via tox
95
chardet==5.2.0
106
# via tox
117
colorama==0.4.6
128
# via tox
13-
distlib==0.3.8
9+
distlib==0.3.9
1410
# via virtualenv
15-
filelock==3.16.1
11+
filelock==3.17.0
1612
# via
1713
# tox
1814
# virtualenv
1915
iniconfig==2.0.0
2016
# via pytest
21-
nodeenv==1.9.0
17+
nodeenv==1.9.1
2218
# via pyright
23-
packaging==24.1
19+
packaging==24.2
2420
# via
2521
# pyproject-api
2622
# pytest
@@ -33,19 +29,23 @@ pluggy==1.5.0
3329
# via
3430
# pytest
3531
# tox
36-
pyproject-api==1.8.0
32+
pyproject-api==1.9.0
3733
# via tox
38-
pyright==1.1.365
34+
pyright==1.1.392.post0
3935
# via -r requirements/requirements-test.in
40-
pytest==8.3.3
36+
pytest==8.3.4
4137
# via -r requirements/requirements-test.in
42-
tomli==2.0.1
38+
tomli==2.2.1
4339
# via -r requirements/requirements-test.in
44-
tox==4.21.0
40+
tox==4.24.1
4541
# via
4642
# -r requirements/requirements-test.in
4743
# tox-gh-actions
4844
tox-gh-actions==3.2.0
4945
# via -r requirements/requirements-test.in
50-
virtualenv==20.26.6
46+
typing-extensions==4.12.2
47+
# via
48+
# -c requirements/requirements.txt
49+
# pyright
50+
virtualenv==20.29.1
5151
# via tox

requirements/requirements.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
#
2-
# This file is autogenerated by pip-compile with Python 3.12
3-
# by the following command:
4-
#
5-
# pip-compile requirements/requirements.in
6-
#
1+
# This file was autogenerated by uv via the following command:
2+
# uv pip compile requirements/requirements.in -o requirements/requirements.txt
73
typing-extensions==4.12.2
84
# via -r requirements/requirements.in

src/jsonlogic/registry.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
from __future__ import annotations
44

5-
from typing import Callable, Type, TypeVar, overload
5+
from collections.abc import Callable
6+
from typing import TypeVar, overload
67

78
from ._compat import Self, TypeAlias
89
from .core import Operator
@@ -22,9 +23,9 @@ def __init__(self, operator_id: str, /) -> None:
2223
self.operator_id = operator_id
2324

2425

25-
OperatorType: TypeAlias = Type[Operator]
26+
OperatorType: TypeAlias = type[Operator]
2627

27-
OperatorTypeT = TypeVar("OperatorTypeT", bound=Type[Operator])
28+
OperatorTypeT = TypeVar("OperatorTypeT", bound=type[Operator])
2829

2930

3031
class OperatorRegistry:

src/jsonlogic/utils.py

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

33
import enum
4+
from collections.abc import Generator
45
from contextlib import contextmanager
5-
from typing import Generic, Iterator, Literal, TypeVar
6+
from typing import Generic, Literal, TypeVar
67

78
from ._compat import TypeAlias
89

@@ -17,7 +18,7 @@ def __repr__(self) -> str:
1718
UNSET = _UnsetTypeEnum.UNSET
1819
"""A sentinel value representing an unset (or not provided) value."""
1920

20-
UnsetType: TypeAlias = Literal[UNSET]
21+
UnsetType: TypeAlias = Literal[_UnsetTypeEnum.UNSET]
2122
"""The type of the :data:`UNSET` sentinel value."""
2223

2324

@@ -38,7 +39,7 @@ def get(self, index: int, /) -> DataT:
3839
return self._stack[-index - 1]
3940

4041
@contextmanager
41-
def push(self, data: DataT) -> Iterator[None]:
42+
def push(self, data: DataT) -> Generator[None]:
4243
self._stack.append(data)
4344

4445
try:

0 commit comments

Comments
 (0)