Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Valid standard-library logging calls can start raising
TypeErrorafter addingLogfireLoggingHandler: when a message object's__str__returns a percent template, the handler applies%to the object instead of its string representation. For example,logger.error(message_object, 'gemini')fails for an object rendering asmodel %s finished, interrupting the logging call and subsequent handlers.Convert the local message to
strbefore interpolation, following the Python logging contract. Keep the existing no-arguments early return so Logfire's minimum-level filtering remains lazy. The original record, grouping template, structured positional/mapping arguments and extra attributes remain intact.Validation:
TypeErrors on unchanged main and pass with the fix. All 28 stdlib/Loguru tests pass, including filtering and invalid-template guards.Local checks used macOS arm64 / Python 3.12.10 with locked dependencies. Docker-backed integrations, the full Python/OS matrix and the globally combined 100% coverage gate are left to upstream CI; the module coverage above is not a whole-project claim. No configuration, dependency, API or documentation changes.
Upstream CI status: attempt 1 has 15 successful jobs, including Python 3.11–3.14, Pydantic 2.4, OTel 1.39, install/upgrade checks and Pyodide. The Python 3.10 job failed when a documentation example collected an unclosed event loop and Unix sockets (
PytestUnraisableExceptionWarning); its allocation root cause has not been established. The aggregate gate therefore failed and combined coverage was skipped. GitHub rejected both retry requests because rerunning requires repository admin rights. This draft remains pending that CI result; no warning suppression or unrelated code change was added.AI-assisted implementation and independent review using Codex Sol agents.