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.
Summary
Env.timedelta(..., format="iso8601")currently accepts duration strings without any components (P,PT, signed/whitespace variants) as zero. It also accepts an empty time section after a day component (P1DTbecomes one day). This silently accepts malformed configuration instead of raisingEnvValidationError.Require a component after
P, and a time component wheneverTis present. Valid zero durations such asP0W,P0D, andPT0Sremain supported. The change is limited to two regex lookaheads; invalid strings fall through to the existing validation path.Regression coverage
Validation
Python 3.12.10, marshmallow 4.3.1, dependencies from the existing frozen lockfile:
test_read_from_file_path_is_unreadable:chmod(0o000)does not make the file unreadable here. On the unchanged upstream checkout, the same test fails (134 passed, 1 failed). No unrelated permission test was modified.mypy --warn-unused-ignores: passed.git diff --check: passed.I have not run the full upstream multi-version/Linux CI matrix locally.
AI assistance was used to investigate, implement, and test this change.