Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 12d04df

Browse files
authored
Add 3.14 (#723)
1 parent 2e8e34f commit 12d04df

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ You can find our backwards-compatibility policy [here](https://github.com/hynek/
1515

1616
## [Unreleased](https://github.com/hynek/structlog/compare/25.3.0...HEAD)
1717

18+
### Added
19+
20+
- Support for Python 3.14.
21+
1822

1923
## [25.3.0](https://github.com/hynek/structlog/compare/25.2.0...25.3.0) - 2025-04-25
2024

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ classifiers = [
2323
"Programming Language :: Python :: 3.11",
2424
"Programming Language :: Python :: 3.12",
2525
"Programming Language :: Python :: 3.13",
26+
"Programming Language :: Python :: 3.14",
2627
"Topic :: System :: Logging",
2728
"Typing :: Typed",
2829
]

src/structlog/stdlib.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,12 @@ def filter_by_level(
787787
...
788788
DropEvent
789789
"""
790-
if logger.isEnabledFor(NAME_TO_LEVEL[method_name]):
790+
if (
791+
# We can't use logger.isEnabledFor() because it's always disabled when
792+
# a log entry is in flight on Python 3.14 and later,
793+
not logger.disabled
794+
and NAME_TO_LEVEL[method_name] >= logger.getEffectiveLevel()
795+
):
791796
return event_dict
792797

793798
raise DropEvent

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ min_version = 4
33
env_list =
44
pre-commit,
55
mypy-pkg,
6-
py3{8,9,10,11,12,13}-{tests,mypy}
6+
py3{8,9,10,11,12,13,14}-{tests,mypy}
77
py3{8,13}-tests-{colorama,be,rich},
88
docs-{sponsors,doctests},
99
coverage-report

0 commit comments

Comments
 (0)