Skip to content

Commit 3cbceb5

Browse files
authored
Merge pull request #13 from LeakIX/update-python-3.13-3.14
Update Python to 3.13/3.14, upgrade all dependencies
2 parents 4fcb8cd + 17402be commit 3cbceb5

File tree

3 files changed

+31
-16
lines changed

3 files changed

+31
-16
lines changed

.github/workflows/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ jobs:
66
strategy:
77
fail-fast: false
88
matrix:
9-
python-version: ["3.9", "3.10", "3.11", "3.12"]
10-
poetry-version: ["1.8.5"]
11-
os: ["ubuntu-22.04", "macos-latest", "windows-latest"]
9+
python-version: ["3.13"]
10+
poetry-version: ["2.3.1"]
11+
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
1212
runs-on: ${{ matrix.os }}
1313
steps:
1414
- uses: actions/checkout@v4

pyproject.toml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,16 @@ repository = "https://github.com/leakix/l9format-python"
1111
documentation = "https://github.com/leakix/l9format-python"
1212

1313
[tool.poetry.dependencies]
14-
python = "^3.9"
15-
# Updating to 0.9.0 breaks the support of iso8601.
16-
# The author of serde updated its code to use the stdlib iso8601 support, which
17-
# does not support for instance:
18-
# 2023-10-05T23:30:36.823867784Z
19-
# Bump up to python 3.11 fixes the issue as it seems fixed in the stdlib of 3.11
20-
serde = "^0.8.1"
14+
python = "^3.13"
15+
serde = "^0.9.0"
2116

2217
[tool.poetry.group.dev.dependencies]
23-
black = "^24.10.0"
24-
fire = "^0.7.0"
25-
isort = "^5.12.0"
26-
pip-audit = "^2.7.3"
27-
pytest = "^8.3.4"
28-
ruff = "^0.9.2"
18+
black = "^26.1.0"
19+
fire = "^0.7.1"
20+
isort = "^7.0.0"
21+
pip-audit = "^2.10.0"
22+
pytest = "^9.0.2"
23+
ruff = "^0.14.14"
2924

3025
[build-system]
3126
requires = ["poetry-core>=1.0.0"]

tests/test_l9format.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,23 @@ def test_l9events_form_ip4scout():
2121
for path in IP4SCOUT_FILES:
2222
c = json.load(open(str(path), "r"))
2323
l9format.L9Event.from_dict(c)
24+
25+
26+
def test_iso8601_nanosecond_parsing():
27+
"""
28+
Test ISO8601 datetime parsing with nanosecond precision.
29+
30+
serde 0.9.0+ uses Python stdlib iso8601 support which handles nanoseconds
31+
correctly in Python 3.11+.
32+
"""
33+
path = TESTS_DIR / "l9event.json"
34+
c = json.load(open(str(path), "r"))
35+
# Use a timestamp with nanosecond precision (9 decimal places)
36+
c["time"] = "2023-10-05T23:30:36.823867784Z"
37+
event = l9format.L9Event.from_dict(c)
38+
assert event.time.year == 2023
39+
assert event.time.month == 10
40+
assert event.time.day == 5
41+
assert event.time.hour == 23
42+
assert event.time.minute == 30
43+
assert event.time.second == 36

0 commit comments

Comments
 (0)