Skip to content

gh-159739: Preserve the syntax error if metadata allocation fails - #159751

Merged
JelleZijlstra merged 1 commit into
python:mainfrom
jelle-openai:jelle/codex/gh-159739-parser-exception
Oct 20, 2026
Merged

JelleZijlstra merged 1 commit into
python:mainfrom
jelle-openai:jelle/codex/gh-159739-parser-exception

Conversation

@jelle-openai

@jelle-openai jelle-openai commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Restore the original exception when optional syntax-error metadata
cannot be allocated.

Backport to 3.15 and 3.14. On 3.14, also remove the erroneous
Py_DECREF(the_source): the N format unit already consumed that
reference.

Restore the original exception when optional syntax-error metadata
cannot be allocated.

Backport to 3.15 and 3.14. On 3.14, also remove the erroneous
Py_DECREF(the_source): the N format unit already consumed that
reference.
@JelleZijlstra JelleZijlstra added needs backport to 3.14 bugs and security fixes needs backport to 3.15 bugs and security fixes labels Oct 19, 2026
@JelleZijlstra
JelleZijlstra merged commit 9c239fb into python:main Oct 20, 2026
62 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @jelle-openai for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Oct 20, 2026

Copy link
Copy Markdown

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

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

bedevere-app Bot commented Oct 20, 2026

Copy link
Copy Markdown

GH-159846 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 Oct 20, 2026
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.

2 participants