Repository navigation
Conversation
FanWu-ai
marked this pull request as ready for review
October 20, 2026 21:39
Merging this PR will not alter performanceℹ️ 1 benchmark has no flamegraph
Comparing |
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
Interval.range("days", 0)yields the same start forever. A negative amount advances away from the end rather than toward it, so a normallist(...)call continues until date overflow. Inverted intervals already select their own direction and are affected too.Reject zero and negative amounts with
ValueErrorbefore yielding any dates. Positive steps and interval-defined direction are unchanged. Tests cover forward/reverse and absolute intervals, date/datetime inputs, single-point intervals and positive step controls. Document the positive-amount requirement and generator validation timing.Verification
Linux x86_64 / CPython 3.12.14, upstream
e06dacedc4cdea90fa1286b3965d180ab94cf251:prek run --all-files: all six hooks passed, including Ruff and Rust formatting/clippy.mkdocs build --strict -f docs/mkdocs.yml: passed; the same six pre-existing informational anchor notices appear on the pristine build.git diff --check: passed.The unchanged skips are one Windows-only test and two existing unsupported zoneinfo POSIX-transition cases. Native-extension loading was verified. Other operating systems and Python versions were not tested locally. Hosted CI is not claimed passed.
Pull Request Check List
Prepared and tested with OpenAI Codex assistance, including automated review. No human review is claimed.