GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — _zoneinfo: reject empty quoted POSIX TZ abbreviations by youknowdot · Pull Request #9017 · RustPython/RustPython

Conversation

@youknowdot

@youknowdot youknowdot commented Oct 9, 2026 •
edited by coderabbitai Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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

  • This PR follows the project's AI policy.

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
All reactions
  • 👍 1 reaction
@youknowdot
Reject empty quoted POSIX timezone abbreviations
f473bd6
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

coderabbitai Bot commented Oct 9, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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 Warning 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 Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: rejecting empty quoted POSIX TZ abbreviations in _zoneinfo.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed 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)
  • Create a new PR


  • 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
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@youknowone
youknowone marked this pull request as ready for review October 9, 2026 11:54
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

youknowone
youknowone reviewed Oct 9, 2026
View reviewed changes
Comment thread extra_tests/snippets/stdlib_zoneinfo.py

@youknowone youknowone Oct 9, 2026

Copy link
Copy Markdown
Member

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.

All reactions
@youknowdot
Keep zoneinfo regression in module snippet
1f6e983
Rename the snippet as requested during review without changing test contents.

Assisted-by: OpenAI Codex:model identifier unavailable
@codspeed

codspeed Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 62 untouched benchmarks
⏩ 4 skipped benchmarks1


Comparing youknowdot:fix-zoneinfo-empty-abbreviations (1f6e983) with main (bd8fdb7)

Open in CodSpeed

Footnotes

  1. 4 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

youknowone
youknowone approved these changes Oct 9, 2026
View reviewed changes
@youknowone
youknowone merged commit 59b36dd into RustPython:main Oct 9, 2026
21 checks passed

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@youknowone youknowone youknowone approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

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.

2 participants

@youknowdot @youknowone
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.