Skip to content

gh-156067: Fix two error handling issues in _zoneinfo.load_data() - #156068

Merged
StanFromIreland merged 2 commits into
python:mainfrom
StanFromIreland:156067
Aug 20, 2026
Merged

gh-156067: Fix two error handling issues in _zoneinfo.load_data()#156068
StanFromIreland merged 2 commits into
python:mainfrom
StanFromIreland:156067

Conversation

@StanFromIreland

@StanFromIreland StanFromIreland commented Aug 19, 2026

Copy link
Copy Markdown
Member

@StanFromIreland

Copy link
Copy Markdown
Member Author

@serhiy-storchaka can you please take a little look?

@hu-jeff hu-jeff left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels like something that would need tests, but not entirely sure on the standards here. Have a small suggestion on simplification!

Comment thread Modules/_zoneinfo.c Outdated
@StanFromIreland

Copy link
Copy Markdown
Member Author

This feels like something that would need tests

I don't think they're worth it here. We don't have tests for every single condition, and as I noted on the issue, getting a negative transition index in practice is impossible.

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. 👍

@StanFromIreland StanFromIreland added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Aug 20, 2026
@StanFromIreland
StanFromIreland merged commit 21a6a8a into python:main Aug 20, 2026
110 of 112 checks passed
@StanFromIreland
StanFromIreland deleted the 156067 branch August 20, 2026 09:16
@miss-islington-app

Copy link
Copy Markdown

Thanks @StanFromIreland for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Aug 20, 2026

Copy link
Copy Markdown

GH-156088 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Aug 20, 2026
@bedevere-app

bedevere-app Bot commented Aug 20, 2026

Copy link
Copy Markdown

GH-156089 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Aug 20, 2026
@bedevere-app

bedevere-app Bot commented Aug 20, 2026

Copy link
Copy Markdown

GH-156090 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Aug 20, 2026
StanFromIreland added a commit that referenced this pull request Aug 20, 2026
…ta()` (GH-156068) (#156090)

(cherry picked from commit 21a6a8a)

Co-authored-by: Stan Ulbrych <stan@python.org>
StanFromIreland added a commit that referenced this pull request Aug 20, 2026
…ta()` (GH-156068) (#156089)

(cherry picked from commit 21a6a8a)

Co-authored-by: Stan Ulbrych <stan@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants