Skip to content

Commit 49fe5fb

Browse files
author
Tobias Ahrens
committed
Add support for Python 3.13
1 parent a9e9f47 commit 49fe5fb

7 files changed

Lines changed: 26 additions & 19 deletions

File tree

.github/workflows/code_quality.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
python-version: ["3.9", "3.10", "3.11", "3.12"]
15+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
1616
steps:
17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v4
1818
- name: Setup Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v1
19+
uses: actions/setup-python@v5
2020
with:
2121
python-version: ${{ matrix.python-version }}
2222
- name: Install dependencies

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ jobs:
1010
runs-on: "ubuntu-latest"
1111
steps:
1212
- name: "Checkout tag/branch"
13-
uses: "actions/checkout@v3"
13+
uses: "actions/checkout@v4"
1414
- name: "Setup Python"
15-
uses: "actions/setup-python@v3"
15+
uses: "actions/setup-python@v5"
1616
with:
1717
python-version: "3.11"
1818

.github/workflows/tests.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ jobs:
2222
coverage: true
2323
- name: py312
2424
python-version: "3.12"
25+
- name: py313
26+
python-version: "3.13"
2527
steps:
26-
- uses: actions/checkout@v2
28+
- uses: actions/checkout@v4
2729
- name: Setup Python ${{ matrix.python-version }}
28-
uses: actions/setup-python@v1
30+
uses: actions/setup-python@v5
2931
with:
3032
python-version: ${{ matrix.python-version }}
3133
- name: Install dependencies
@@ -34,6 +36,6 @@ jobs:
3436
run: hatch run +py=${{ matrix.python-version }} test:cov
3537
- name: Upload coverage reports to Codecov
3638
if: matrix.coverage
37-
uses: codecov/codecov-action@v3
39+
uses: codecov/codecov-action@v4
3840
env:
39-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
41+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Labone Python API Changelog
22

3+
## Version 3.1.1
4+
5+
* Add support for Python 3.13
6+
37
## Version 3.1.0
48
* Expose timeout from underlying package when creating a new connection.
59
This allows specifying custom timeouts, e.g. when dealing with slow networks
@@ -57,4 +61,4 @@ defined in the capnp schema.
5761
* set Values(s)
5862
* list nodes
5963
* subscribe
60-
* Async node tree implementation.
64+
* Async node tree implementation.

pyproject.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ classifiers = [
2323
"Programming Language :: Python :: 3.10",
2424
"Programming Language :: Python :: 3.11",
2525
"Programming Language :: Python :: 3.12",
26+
"Programming Language :: Python :: 3.13",
2627
"Topic :: Scientific/Engineering",
2728
]
2829
dependencies = [
@@ -51,7 +52,7 @@ exclude = ["/.github", "/docs"]
5152
packages = ["src/labone"]
5253

5354
[[tool.hatch.envs.test.matrix]]
54-
python = ["3.9", "3.10", "3.11", "3.12"]
55+
python = ["3.9", "3.10", "3.11", "3.12", "3.13"]
5556

5657
[tool.hatch.envs.test]
5758
dependencies = ["coverage[toml]>=6.5", "hypothesis", "pytest", "pytest-asyncio"]
@@ -75,7 +76,7 @@ cov-report = [
7576
cov = ["test-cov", "cov-report"]
7677

7778
[[tool.hatch.envs.lint.matrix]]
78-
python = ["3.9", "3.10", "3.11", "3.12"]
79+
python = ["3.9", "3.10", "3.11", "3.12", "3.13"]
7980

8081
[tool.hatch.envs.lint]
8182
dependencies = [
@@ -93,11 +94,11 @@ fmt = ["black {args:.}", "ruff check --fix {args:.}", "style"]
9394
all = ["style", "typing"]
9495

9596
[tool.black]
96-
target-version = ["py38"]
97+
target-version = ["py39"]
9798

9899
[tool.ruff]
99100
src = ["src", "tests"]
100-
target-version = "py38"
101+
target-version = "py39"
101102

102103
[tool.ruff.lint]
103104
select = ["ALL"]

src/labone/core/subscription.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ def fork(
302302
Returns:
303303
A new data queue to the same underlying subscription.
304304
"""
305-
return DataQueue.fork(
305+
return DataQueue.fork( # type: ignore[return-value]
306306
self,
307307
queue_type=queue_type if queue_type is not None else CircularDataQueue,
308308
)
@@ -371,7 +371,7 @@ def fork(
371371
Returns:
372372
A new data queue to the same underlying subscription.
373373
"""
374-
return DataQueue.fork(
374+
return DataQueue.fork( # type: ignore[return-value]
375375
self,
376376
queue_type=(
377377
queue_type if queue_type is not None else DistinctConsecutiveDataQueue

src/labone/nodetree/helper.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
T = t.TypeVar("T")
2626

2727

28-
TreeProp = t.Dict[LabOneNodePath, T]
28+
TreeProp = dict[LabOneNodePath, T]
2929

3030

3131
class NestedDict(t.Protocol[T]): # type: ignore[misc]
@@ -46,9 +46,9 @@ def __iter__(self) -> t.Iterator[str]:
4646
"""..."""
4747

4848

49-
FlatPathDict: TypeAlias = t.Dict[
49+
FlatPathDict: TypeAlias = dict[
5050
NormalizedPathSegment,
51-
t.List[t.List[NormalizedPathSegment]],
51+
list[list[NormalizedPathSegment]],
5252
]
5353

5454

0 commit comments

Comments
 (0)