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-132661: DisallowTemplate/str concatenation after PEP 750 spec update#135996

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

Draft
davepeck wants to merge2 commits intopython:main
base:main
Choose a base branch
Loading
fromt-strings:pep750-concat-update

Conversation

davepeck
Copy link
Contributor

@davepeckdavepeck commentedJun 26, 2025
edited by bedevere-appbot
Loading

Following thesteering council decision and correspondingupdate to PEP750, we are removing support for both implicit and explicitTemplate/str concatenation.

@lysnikolaou I took a first pass at this, but it's still just a draft. I deleted the obvious code and updated our tests. But there's still more to clean up, both inaction_helpers.c/_PyPegen_concatenate_strings (I just raised a syntax error if templates/non-templates were mixed, rather than cleaning up code that now supports more than it needs to), and probably in_ast_unparse.py amongst others. Happy to do this with your input, or happy to hand it off to you!

Copy link
Member

@sobolevnsobolevn left a comment

Choose a reason for hiding this comment

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

Thank you!

@@ -1902,6 +1907,7 @@ _PyPegen_concatenate_strings(Parser *p, asdl_expr_seq *strings,
}
}


Copy link
Member

Choose a reason for hiding this comment

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

unrelated change :)

Py_TYPE(right)->tp_name);
returnNULL;
}
PyErr_Format(PyExc_TypeError,
Copy link
Member

Choose a reason for hiding this comment

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

You can use%T to format object's type.

combined=t1+", world"
self.assertTStringEqual(combined, ("Hello, world",), ())
self.assertEqual(fstring(combined),"Hello, world")
withself.assertRaises(TypeError):
Copy link
Member

Choose a reason for hiding this comment

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

Will it make sense to check error message here?

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

@sobolevnsobolevnsobolevn left review comments

@lysnikolaoulysnikolaouAwaiting requested review from lysnikolaoulysnikolaou will be requested when the pull request is marked ready for reviewlysnikolaou is a code owner

@Eclips4Eclips4Awaiting requested review from Eclips4Eclips4 will be requested when the pull request is marked ready for reviewEclips4 is a code owner

@tomasr8tomasr8Awaiting requested review from tomasr8tomasr8 will be requested when the pull request is marked ready for reviewtomasr8 is a code owner

@pablogsalpablogsalAwaiting requested review from pablogsalpablogsal will be requested when the pull request is marked ready for reviewpablogsal is a code owner

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@davepeck@sobolevn

[8]ページ先頭

©2009-2025 Movatter.jp