Skip to content

gh-142433: Move deref to below the error when checking for laststring#142402

Merged
vstinner merged 3 commits into
python:mainfrom
mike-goutokuji:deref-template
Dec 10, 2025
Merged

gh-142433: Move deref to below the error when checking for laststring#142402
vstinner merged 3 commits into
python:mainfrom
mike-goutokuji:deref-template

Conversation

@mike-goutokuji

@mike-goutokuji mike-goutokuji commented Dec 8, 2025

Copy link
Copy Markdown
Contributor

Move deref of laststring to below the error checking so the deref is applied after the object in strings is replaced.

@bedevere-app

bedevere-app Bot commented Dec 8, 2025

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@bedevere-app

bedevere-app Bot commented Dec 8, 2025

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

Comment thread Objects/templateobject.c
@eendebakpt

Copy link
Copy Markdown
Contributor

@AZero13 Can you write a news entry and create a corresponding issue? See https://devguide.python.org/getting-started/pull-request-lifecycle/ for details

@bedevere-app

bedevere-app Bot commented Dec 8, 2025

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@mike-goutokuji mike-goutokuji changed the title Remove erroneous dereference of laststring gh-142433: Move deref to below the error when checking for laststring. Dec 8, 2025
@bedevere-app

bedevere-app Bot commented Dec 8, 2025

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@mike-goutokuji mike-goutokuji changed the title gh-142433: Move deref to below the error when checking for laststring. gh-142433: Move deref to below the error when checking for laststring Dec 8, 2025
…string

Move deref of laststring to below the error checking so the deref is applied after the object in strings is replaced.
@eendebakpt

Copy link
Copy Markdown
Contributor

@AZero13 please avoid force pushes, it makes reviewing harder

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

The news entry needs a bit of work, but the change to the code looks good.

Comment thread Misc/NEWS.d/next/Core_and_Builtins/2025-12-08-17-34-57.gh-issue-142402.iV0ON3.rst Outdated

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

Comment thread Objects/templateobject.c

@vstinner vstinner 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

@vstinner vstinner added the needs backport to 3.14 bugs and security fixes label Dec 9, 2025
@vstinner vstinner merged commit 785268f into python:main Dec 10, 2025
84 of 85 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @AZero13 for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 10, 2025
…string (pythonGH-142402)

Move deref of laststring to below the error checking so the deref
is applied after the object in strings is replaced.
(cherry picked from commit 785268f)

Co-authored-by: AZero13 <gfunni234@gmail.com>
@bedevere-app

bedevere-app Bot commented Dec 10, 2025

Copy link
Copy Markdown

GH-142524 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 Dec 10, 2025
@vstinner

Copy link
Copy Markdown
Member

Merged, thanks.

@mike-goutokuji mike-goutokuji deleted the deref-template branch December 10, 2025 15:45
vstinner pushed a commit that referenced this pull request Dec 10, 2025
…tstring (GH-142402) (#142524)

gh-142433: Move deref to below the error when checking for laststring (GH-142402)

Move deref of laststring to below the error checking so the deref
is applied after the object in strings is replaced.
(cherry picked from commit 785268f)

Co-authored-by: AZero13 <gfunni234@gmail.com>
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.

4 participants