GeezerVison is showing github.com — _zoneinfo: reject empty quoted POSIX TZ abbreviations by youknowdot · Pull Request #9017 · RustPython/RustPython
Conversation
youknowdot
commented
Oct 9, 2026
•
edited by coderabbitai
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
Split the Python 3.14-compatible empty-abbreviation fix from #8954.
Reject an empty quoted abbreviation in the native POSIX TZ rule parser, for both standard and daylight-saving names. CPython 3.14 already rejects these inputs. Keep valid quoted names working.
Add a focused snippet using a minimal TZif fixture. The existing shared canonical cases do not cover empty quoted abbreviations; this leaves the pure-Python library and its assertions unchanged.
Validation
- Reproduced the failure on main
d0dfcb54 through the snippet runner: ValueError was not raised for <>5.
- The same snippet passes with this patch and on CPython 3.14.7.
- All four existing
CTZStrTest canonical tests pass unchanged.
- Release workspace test targets compile with
--no-run, excluding WASM, venvlauncher, and C API; the separate C-API test target also compiles with --no-run.
- Affected-crate Clippy and repository hooks pass.
Local runtime validation is limited to the focused snippet and canonical tests above. Broad Rust test targets were compile-checked, not executed.
Reference: CPython 3.14 parse_abbr.
AI assistance
OpenAI Codex assisted with auditing the split, implementation, regression coverage, and validation. The runtime does not expose an exact model identifier.
Summary by CodeRabbit
- Bug Fixes
- Time zone rules with empty abbreviations enclosed in angle brackets now raise a
ValueError instead of being accepted as empty names.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
chatgpt-codex-connector[bot] reacted with thumbs up emoji
Split the Python 3.14-compatible parser guard from RustPython#8954. Cover empty standard and daylight-saving abbreviations and preserve valid quoted names.
Assisted-by: OpenAI Codex:model identifier unavailable
coderabbitai
Bot
commented
Oct 9, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
- Configuration used: Repository: RustPython/RustPython/.coderabbit.yml
- Review profile: CHILL
- Plan: Advanced
- Run ID:
2d1e53f3-81a5-418e-b585-f9e147d1e949
📥 Commits
Reviewing files that changed from the base of the PR and between f473bd6 and 1f6e983.
📒 Files selected for processing (1)
extra_tests/snippets/stdlib_zoneinfo.py
💤 Files with no reviewable changes (1)
- extra_tests/snippets/stdlib_zoneinfo.py
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
📝 Walkthrough
Walkthrough
The POSIX time-zone abbreviation parser now rejects empty angle-bracket abbreviations. Tests verify that empty abbreviations raise ValueError and that a quoted +05 abbreviation is accepted.
Changes
Time-zone abbreviation parsing
| Layer / File(s) |
Summary |
Validate POSIX abbreviations crates/stdlib/src/_zoneinfo.rs, extra_tests/snippets/stdlib_zoneinfo.py |
The parser rejects empty angle-bracket abbreviations. Tests load minimal TZif v3 data to verify rejection of empty abbreviations and acceptance of quoted +05. |
Priority: ⬇️ Low
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers: youknowone
Merge Risk: ⚪ Minimal · up to 1f6e9
The parser and tests cover the intended rejection without an identified regression. The change is ready to merge after normal checks.
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
| Check name |
Status |
Explanation |
Resolution |
| Docstring Coverage |
 |
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 3 files. |
Write docstrings for the functions missing them to satisfy the coverage threshold. |
✅ Passed checks (4 passed)
| Check name |
Status |
Explanation |
| Description Check |
 |
Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check |
 |
The title clearly and concisely describes the main change: rejecting empty quoted POSIX TZ abbreviations in _zoneinfo. |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
- Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Codex Review Summary
This comment shows the latest Codex review activity on this pull request.
| Review |
Status |
Commit |
Review trigger |
| 📝 Code Review |
✅ Completed 2026-10-09T11:57:56.670029Z |
f473bd6 |
Draft marked ready |
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review" or "@codex security review".
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to stdlib_zoneinfo.py
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Rename the snippet as requested during review without changing test contents.
Assisted-by: OpenAI Codex:model identifier unavailable
Merging this PR will not alter performance
✅ 62 untouched benchmarks
⏩ 4 skipped benchmarks1
Comparing youknowdot:fix-zoneinfo-empty-abbreviations (1f6e983) with main (bd8fdb7)
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|