Skip to content

gh-132661: Disallow Template/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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 36 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
5d5e187
Disallow explicit concat between Template and str
davepeck Jun 26, 2025
1cc778f
First pass at removing implicit Template/str concat
davepeck Jun 26, 2025
7ea498c
Merge branch 'main' into pep750-concat-update
davepeck Jun 30, 2025
d08c8b8
Merge branch 'main' into pep750-concat-update
davepeck Jul 8, 2025
c662041
Remove extraneous newline
davepeck Jul 8, 2025
b17b7c9
Add expected exception messages to tests
davepeck Jul 8, 2025
a0c1bb6
Remove _ast_unparse t/f implicit concat helper code
davepeck Jul 8, 2025
23988e8
Merge branch 'main' into pep750-concat-update
davepeck Jul 8, 2025
d7eadec
Add a parallel comment
davepeck Jul 8, 2025
cb1ad63
Add news blurb for PR.
davepeck Jul 8, 2025
741eaf2
One day, I may develop RST muscle memory.
davepeck Jul 8, 2025
8aeb512
Merge branch 'main' into pep750-concat-update
davepeck Jul 9, 2025
bf5447b
Merge branch 'main' into pep750-concat-update
davepeck Jul 9, 2025
7e7ea5a
Merge branch 'main' into pep750-concat-update
davepeck Jul 9, 2025
2f79337
Two minor tweaks
davepeck Jul 9, 2025
dacafdb
Use subtests; test both directions.
davepeck Jul 9, 2025
b272287
Update Objects/templateobject.c
davepeck Jul 9, 2025
ffae8e9
Update Misc/NEWS.d/next/Core_and_Builtins/2025-07-08-23-22-08.gh-issu…
davepeck Jul 9, 2025
c6ca45a
Fix bug in suggested change
davepeck Jul 9, 2025
091a2a9
Merge branch 'main' into pep750-concat-update
davepeck Jul 9, 2025
860caea
First pass at update to grammar and action_helpers.c
davepeck Jul 10, 2025
6a6f734
Merge branch 'main' into pep750-concat-update
davepeck Jul 10, 2025
860f81d
Simplify grammar
davepeck Jul 10, 2025
e0fe608
Use KNOWN_RANGE for string/t-string mix error messages
davepeck Jul 10, 2025
c9ed06b
Merge branch 'pep750-concat-update' of github.com:t-strings/cpython i…
davepeck Jul 10, 2025
3ebdd97
Merge branch 'main' into pep750-concat-update
davepeck Jul 10, 2025
ef1cd5c
Clean up ast_unparse.c append_tstring()
davepeck Jul 10, 2025
055af82
Merge branch 'main' into pep750-concat-update
davepeck Jul 15, 2025
ab393f7
Update Misc/NEWS.d/next/Core_and_Builtins/2025-07-08-23-22-08.gh-issu…
davepeck Jul 15, 2025
16e6a1f
Update Objects/templateobject.c
davepeck Jul 15, 2025
b81a807
Update error messages; add an assert(0)
davepeck Jul 15, 2025
b9bac0e
Simplify ast_unparase.c further
davepeck Jul 15, 2025
6b6acda
Fix news dangling reference (for now).
davepeck Jul 15, 2025
e5b03e8
Merge branch 'pep750-concat-update' of github.com:t-strings/cpython i…
davepeck Jul 15, 2025
6ea3af3
Fix exception assert message checks
davepeck Jul 16, 2025
5037f89
Remove no-longer used path in codegen.c
davepeck Jul 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update Misc/NEWS.d/next/Core_and_Builtins/2025-07-08-23-22-08.gh-issu…
…e-132661.34ftJl.rst

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
  • Loading branch information
davepeck and lysnikolaou authored Jul 15, 2025
commit ab393f78ca87a0da364213296b39257537dd593b
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Reflect recent :pep:`750` change.

Disallow concatenation of :class:`string.Template` and :class:`str`. Also, disallow implicit
Disallow concatenation of :class:`string.templatelib.Template` and :class:`str`. Also, disallow implicit
concatenation of t-string literals with string or f-string literals.
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy