Skip to content

Commit dd0d0c7

Browse files
feat: add python 3.14 support
1 parent 494c786 commit dd0d0c7

File tree

4 files changed

+2312
-2022
lines changed

4 files changed

+2312
-2022
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
runs-on: ubuntu-latest
5050
strategy:
5151
matrix:
52-
python-version: ['3.10', '3.11', '3.12', '3.13']
52+
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
5353

5454
steps:
5555
- uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2

posthog/test/test_utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import sys
12
import time
23
import unittest
34
from dataclasses import dataclass
@@ -122,7 +123,9 @@ class NestedModel(BaseModel):
122123
"bar": 2,
123124
"baz": None,
124125
}
125-
assert utils.clean(ModelV1(foo=1, bar="2")) == {"foo": 1, "bar": "2"}
126+
# Pydantic V1 is not compatible with Python 3.14+
127+
if sys.version_info < (3, 14):
128+
assert utils.clean(ModelV1(foo=1, bar="2")) == {"foo": 1, "bar": "2"}
126129
assert utils.clean(NestedModel(foo=ModelV2(foo="1", bar=2, baz="3"))) == {
127130
"foo": {"foo": "1", "bar": 2, "baz": "3"}
128131
}

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ classifiers = [
2121
"Programming Language :: Python :: 3.11",
2222
"Programming Language :: Python :: 3.12",
2323
"Programming Language :: Python :: 3.13",
24+
"Programming Language :: Python :: 3.14",
2425
]
2526
dependencies = [
2627
"requests>=2.7,<3.0",

0 commit comments

Comments
 (0)