Skip to content

Commit dee9272

Browse files
committed
feat(python): support for 3.13
1 parent 0b855e1 commit dee9272

File tree

6 files changed

+12
-5
lines changed

6 files changed

+12
-5
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
strategy:
1515
matrix:
1616
python:
17+
- '3.13'
1718
- '3.12'
1819
- '3.11'
1920
- '3.10'
@@ -53,7 +54,7 @@ jobs:
5354
# one for > 3.9)
5455
run: pytest tests/type_checking/test_result.yml
5556
- name: Run tests (pattern matching)
56-
if: matrix.python == '3.10' || matrix.python == '3.11' || matrix.python == '3.12'
57+
if: matrix.python == '3.10' || matrix.python == '3.11' || matrix.python == '3.12' || matrix.python == '3.13'
5758
run: pytest tests/test_pattern_matching.py
5859

5960
# Linters

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ Possible log types:
1313

1414
## [Unreleased]
1515

16+
1617
- `[changed]` Improve type narrowing for `is_ok` and `is_err` type guards by
1718
replacing `typing.TypeGuard` with `typing.TypeIs` (#193)
19+
- `[added]` Add support for Python 3.13 (#181)
1820

1921
## [0.17.0] - 2024-06-02
2022

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requires = ["setuptools", "wheel"]
33
build-backend = "setuptools.build_meta"
44

55
[tool.mypy]
6-
python_version = "3.12"
6+
python_version = "3.13"
77
files = [
88
"src",
99
"tests",

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ classifiers =
2020
Programming Language :: Python :: 3.10
2121
Programming Language :: Python :: 3.11
2222
Programming Language :: Python :: 3.12
23+
Programming Language :: Python :: 3.13
2324
Programming Language :: Python :: 3 :: Only
2425

2526
[options]

src/result/result.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,16 @@
2020
Union,
2121
)
2222

23-
from typing_extensions import TypeIs
24-
2523
if sys.version_info >= (3, 10):
2624
from typing import ParamSpec, TypeAlias
2725
else:
2826
from typing_extensions import ParamSpec, TypeAlias
2927

28+
if sys.version_info >= (3, 13):
29+
from typing import TypeIs
30+
else:
31+
from typing_extensions import TypeIs
32+
3033

3134
T = TypeVar("T", covariant=True) # Success type
3235
E = TypeVar("E", covariant=True) # Error type

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py312,py311,py310,py39,py38
2+
envlist = py313,py312,py311,py310,py39,py38
33

44
[testenv]
55
deps = -rrequirements-dev.txt

0 commit comments

Comments
 (0)