Skip to content

gh-151126: Add PyErr_NoMemory() in strong_cache_node_new - #151137

Closed
sobolevn wants to merge 1 commit into
python:mainfrom
sobolevn:issue-151126-2
Closed

gh-151126: Add PyErr_NoMemory() in strong_cache_node_new#151137
sobolevn wants to merge 1 commit into
python:mainfrom
sobolevn:issue-151126-2

Conversation

@sobolevn

@sobolevnsobolevn commented Jun 9, 2026

Copy link
Copy Markdown
Member

@StanFromIrelandStanFromIreland 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.

This is incorrect, we deliberately don't set the error here. The strong cache is an optimisation whose failure is harmless, the ZoneInfo instance has already been built successfully and gets returned regardless.

Comment threadModules/_zoneinfo.c
Comment on lines 2347 to 2350
* This function doesn't set MemoryError if PyMem_Malloc fails,
* as the cache intentionally doesn't propagate exceptions
* and fails silently if error occurs.
*/

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.

See this comment.

@bedevere-app

Copy link
Copy Markdown

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

@sobolevn

Copy link
Copy Markdown
MemberAuthor

Thanks! I've missed the comment.

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

Labels

awaiting changesneeds backport to 3.13bugs and security fixesneeds backport to 3.14bugs and security fixesneeds backport to 3.15pre-release feature fixes, bugs and security fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@sobolevn@StanFromIreland