Skip to content

Commit b3dfc47

Browse files
authored
feat: modernize (#22)
1 parent 4cc53da commit b3dfc47

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

.github/workflows/benchmark.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
- emoji: 🪟
2020
runs-on: [windows-latest]
2121
python:
22+
- name: CPython 3.13
23+
runs-on: "3.13"
2224
- name: CPython 3.12
2325
runs-on: "3.12"
2426
- name: CPython 3.11
@@ -27,8 +29,6 @@ jobs:
2729
runs-on: "3.10"
2830
- name: CPython 3.9
2931
runs-on: "3.9"
30-
- name: CPython 3.8
31-
runs-on: "3.8"
3232
steps:
3333
- uses: actions/checkout@v4
3434
- uses: actions/setup-python@v5

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023 Mickaël Schoentgen
3+
Copyright (c) 2023-2024 Mickaël Schoentgen
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

bench-json.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from collections import namedtuple
44
from timeit import timeit
55
from types import ModuleType
6-
from typing import Any, Dict, List, Tuple
6+
from typing import Any
77

88
# XXX: here you set which modules you want to benchmark
99
MODULES_TO_TEST = ["fast_json", "pyjson5", "rapidjson", "simplejson", "ujson"]
@@ -36,7 +36,7 @@ def run_dumps(implementation: ModuleType) -> str:
3636
return implementation.dumps(FORMATED)
3737

3838

39-
def run_loads(implementation: ModuleType) -> Dict[str, Any]:
39+
def run_loads(implementation: ModuleType) -> dict[str, Any]:
4040
return implementation.loads(RAW)
4141

4242

@@ -71,7 +71,7 @@ def potential_candidate(good: bool) -> str:
7171

7272

7373
def benchmark(*implementations: str) -> None:
74-
candidates: List[Tuple[bool, str, float, float, float, float]] = []
74+
candidates: list[tuple[bool, str, float, float, float, float]] = []
7575
reference = None
7676
justify = len(max(implementations, key=len))
7777

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
fast-json==0.3.2
2-
pyjson5==1.6.2; python_version < "3.12"
2+
pyjson5==1.6.7
33
python-rapidjson==1.20
44
simplejson==3.19.3
55
ujson==5.10.0

0 commit comments

Comments
 (0)