Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-135148: Correctly handle f/t strings with comments and debug expressions#135198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
pablogsal merged 4 commits intopython:mainfrompablogsal:gh-135148
Jul 16, 2025

Conversation

@pablogsal
Copy link
Member

@pablogsalpablogsal commentedJun 6, 2025
edited by bedevere-appbot
Loading

in_string=0;// Whether we're currently inside a string
string_quote=0;// The quote character for current string (' or ")

// Process each character of input
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

@lysnikolaou please read this carefully. I am mostly sure its correct but itreally needs some extra eyes

Copy link
Member

@lysnikolaoulysnikolaou left a comment

Choose a reason for hiding this comment

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

Yeah, I was thinking something very similar as a solution, too! I found one problem, but it looks good otherwise.

@bedevere-app
Copy link

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

Copy link
Member

@lysnikolaoulysnikolaou left a comment
edited
Loading

Choose a reason for hiding this comment

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

This looks good now! Thanks@pablogsal!

I left a couple of inline comments for some very minor improvements.

Comment on lines +141 to +147
if (!in_string) {
in_string=1;
quote_char=ch;
}
elseif (ch==quote_char) {
in_string=0;
}
Copy link
Member

Choose a reason for hiding this comment

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

This only works because there's always an odd number of quotes in aSTRING token and we're sure that allSTRING tokens will be valid at this point. Maybe add a comment to explain that?

Comment on lines 127 to 128
charquote_char=0;
charstring_quote=0;
Copy link
Member

Choose a reason for hiding this comment

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

Do we need both of these?

@lysnikolaou
Copy link
Member

@pablogsal Ping here. Will we be able to get thins into 3.13 before the rc release? If you don't have time to work on it, I'm okay taking it over.

@pablogsal
Copy link
MemberAuthor

I am travelling today :( If you want and have the time you can push the fixes to the PR and land it but if you don't have time maybe I can get to it at night.

lysnikolaou reacted with thumbs up emoji

Copy link
Member

@lysnikolaoulysnikolaou left a comment

Choose a reason for hiding this comment

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

Pushed a commit with a couple of additions. LGTM now! Let's merge it.

@pablogsalpablogsal merged commitef66fb5 intopython:mainJul 16, 2025
44 of 45 checks passed
@pablogsalpablogsal deleted the gh-135148 branchJuly 16, 2025 09:47
@lysnikolaou
Copy link
Member

Are we backporting this?

@pablogsal
Copy link
MemberAuthor

We should indeed

@pablogsalpablogsal added needs backport to 3.13bugs and security fixes needs backport to 3.14bugs and security fixes labelsJul 16, 2025
@miss-islington-app
Copy link

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

@miss-islington-app
Copy link

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

@miss-islington-app
Copy link

Sorry,@pablogsal, I could not cleanly backport this to3.13 due to a conflict.
Please backport usingcherry_picker on command line.

cherry_picker ef66fb597ba909ead2fbfc06f748aa7b7e9ea437 3.13

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestJul 16, 2025
… expressions (pythonGH-135198)(cherry picked from commitef66fb5)Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
@bedevere-app
Copy link

GH-136720 is a backport of this pull request to the3.14 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.14bugs and security fixes labelJul 16, 2025
@bedevere-app
Copy link

GH-136899 is a backport of this pull request to the3.13 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.13bugs and security fixes labelJul 21, 2025
lysnikolaou added a commit that referenced this pull requestJul 21, 2025
…g expressions (#135198) (#136899)Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull requestAug 4, 2025
Agent-Hellboy pushed a commit to Agent-Hellboy/cpython that referenced this pull requestAug 19, 2025
kumaraditya303 pushed a commit to miss-islington/cpython that referenced this pull requestSep 9, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@lysnikolaoulysnikolaoulysnikolaou approved these changes

Assignees

@pablogsalpablogsal

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@pablogsal@lysnikolaou

[8]ページ先頭

©2009-2025 Movatter.jp