Highlights
The main feature is support for exception groups we stole adapted from Rich, however the main reason for this release at this point in time are backwards-incompatible changes in the upcoming Python 3.13.4. Update structlog before updating Python, if you use structlog.stdlib.filter_by_level()
.
Full changelog below!
Special Thanks
This release would not be possible without my generous sponsors! Thank you to all of you making sustainable maintenance possible! If you would like to join them, go to https://github.com/sponsors/hynek and check out the sweet perks!
Above and Beyond
Variomedia AG (@variomedia), Tidelift (@tidelift), Klaviyo (@klaviyo), Privacy Solutions GmbH (@privacy-solutions), FilePreviews (@filepreviews), Doist (@Doist), nate nowack (@zzstoatzz), Daniel Fortunov (@asqui), and Kevin P. Fleming (@kpfleming).
Maintenance Sustainers
Buttondown (@buttondown), Christopher Dignam (@chdsbd), Magnus Watn (@magnuswatn), David Cramer (@dcramer), Jesse Snyder (@jessesnyder), Rivo Laks (@rivol), Polar (@polarsource), Mike Fiedler (@miketheman), Duncan Hill (@cricalix), Colin Marquardt (@cmarqu), Pieter Swinkels (@swinkels), Nick Libertini (@libertininick), Brian M. Dennis (@crossjam), Moving Content AG (@moving-content), ProteinQure (@ProteinQure), The Westervelt Company (@westerveltco), Sławomir Ehlert (@slafs), Mostafa Khalil (@khadrawy), Filip Mularczyk (@mukiblejlok), Thomas Klinger (@thmsklngr), Andreas Poehlmann (@ap--), August Trapper Bigelow (@atbigelow), Carlton Gibson (@carltongibson), and Roboflow (@roboflow).
Not to forget 14 more amazing humans who chose to be generous but anonymous!
Full Changelog
Added
-
Support for Python 3.14 and Python 3.13.4.
Python 3.14 has an backwards-incompatible change to
logging.Logger.isEnabledFor()
(it now always returns False if a log entry is in flight) that has been backported to 3.13.4 (expected on 2025-06-03). It mainly affectsstructlog.stdlib.filter_by_level()
. #723 -
structlog.tracebacks
now handles exception groups.structlog.tracebacks.Stack
has two new fields,is_group: bool
andexceptions: list[Trace]
. This works similarly to what Rich v14.0.0 does. #720
Fixed
structlog.processors.ExceptionPrettyPrinter
now respects the exception_formatter arguments instead of always using the default formatter. #724
This release contains contributions from @anujdas, @hynek, and @sscherfke.
Artifact Attestations
You can verify this release's artifact attestions using GitHub's CLI tool by downloading the sdist and wheel from PyPI and running:
$ gh attestation verify --owner hynek structlog-25.4.0.tar.gz
and
$ gh attestation verify --owner hynek structlog-25.4.0-py3-none-any.whl