Repository navigation
Fix pydantic-settings 2.16 env decoding regression and a serve-test race - #48
Merged
Merged
Conversation
…c-settings 2.16 stopped doing it for Any values
…w exists from the instant a run starts
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.
Two causes behind the failing runs (weekly Fresh deps since 2026-11-02, Dependabot #46, and one ubuntu job on #45).
pydantic-settings 2.16 regression. From 2.16, an
Anyleaf underapps: dict[str, dict[str, Any]]is no longer JSON-decoded from the environment, soDUDAMEL_APPS__X__LIST='["a"]'arrived as a string and a list- or dict-typed app setting would fail validation. Fresh installs already resolve 2.16 (floor is>=2.3). The env and .env sources are now wrapped to decode each[apps.*]leaf when it parses as JSON and keep the raw string otherwise — the 2.14 behaviour, independent of the installed version. TOML values are untouched (a quoted TOML string stays a string).New tests cover list/table/plain-string env values,
.env, and the TOML non-decode case. Without the fix they fail on 2.16.2; full suite passes on both 2.14.2 and 2.16.2 (1167 tests).test_serve race. Since #39 a job writes a
runningrow at start;test_serve.poll_job_runsreturned the first row it saw, sotest_cancelling_serve_task_shuts_down_cleanlycould readrunninginstead ofok. It now waits for a finished row, matching the helper intest_scheduler.py.