GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-135676: Lexical analysis: Reword String literals and related sections by encukou · Pull Request #135942 · python/cpython

Conversation

@encukou

@encukou encukou commented Jun 25, 2025 •
edited by github-actions Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Hopefully this PR is not too big. I can split it up if that would make it easier to review.

The f-string section is untouched here; a stub is added for t-strings. I'll look at those next.

  • Issue: Reword the Lexical Analysis chapter of the docs #135676

📚 Documentation preview 📚: https://cpython-previews--135942.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

davepeck reacted with heart emoji
All reactions
  • ❤️ 1 reaction
encukou and others added 6 commits June 25, 2025 16:27
@encukou @blaisep
WIP: String literals
d4381aa
Co-authored-by: Blaise Pabon <[email protected]>
@encukou
Use correct Pygments lexer for plain text
80ad85c
@encukou
WIP
e44fa66
@encukou
More WIP
86bf94b
@encukou
Byte strings, raw strings; f-string stub
faf05a1
@encukou
Remove outdated comment
687fe58
@encukou
encukou requested review from AA-Turner and willingc as code owners June 25, 2025 14:40
@bedevere-app bedevere-app Bot added awaiting core review docs Documentation in the Doc dir skip news labels Jun 25, 2025
@github-project-automation github-project-automation Bot added this to Docs PRs Jun 25, 2025
@github-project-automation github-project-automation Bot moved this to Todo in Docs PRs Jun 25, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Jun 25, 2025
Reword the Lexical Analysis chapter of the docs #135676
Open
@encukou encukou mentioned this pull request Jun 25, 2025
Write the official cpython documentation for t-strings t-strings/help#2
Open
10 of 11 tasks
StanFromIreland
StanFromIreland reviewed Jun 25, 2025
View reviewed changes
Comment thread Doc/reference/expressions.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

encukou and others added 2 commits June 25, 2025 16:50
@encukou
Fix ReST errors
9f9d29c
@encukou @StanFromIreland
Update Doc/reference/expressions.rst
11e3731
Co-authored-by: Stan Ulbrych <[email protected]>
davepeck
davepeck reviewed Jun 27, 2025
View reviewed changes

@davepeck davepeck left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks! This was linked into the PEP 750 documentation TODO list so I took a look. I have one comment as it relates to t-strings; the rest of the changes are broader in scope, so I'll leave it to others to comment. (FWIW, I like the reorganization here!)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Doc/reference/expressions.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/reference/lexical_analysis.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

encukou added 2 commits July 2, 2025 16:28
@encukou
f-strings can only be concatenated with themselves
2cd9bf4
@encukou
Merge in the main branch
b51b265
@encukou

encukou commented Jul 9, 2025

Copy link
Copy Markdown
Member Author

@AA-Turner, ping, do you still want to review this?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

AA-Turner
AA-Turner approved these changes Jul 23, 2025
View reviewed changes
Comment thread Doc/reference/expressions.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/reference/expressions.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/reference/expressions.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/reference/lexical_analysis.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/reference/lexical_analysis.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/reference/lexical_analysis.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/reference/lexical_analysis.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/reference/lexical_analysis.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/reference/lexical_analysis.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/reference/lexical_analysis.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Jul 23, 2025
encukou and others added 4 commits July 23, 2025 17:25
@encukou
Merge branch 'main' into lex-analysis-strings
5ecdc81
@encukou @AA-Turner
Apply suggestions from code review
b9c0bcd
Co-authored-by: Adam Turner <[email protected]>
@encukou
Address review
cdb9d59
@encukou
Remove merge artifact
7595f08
AA-Turner
AA-Turner approved these changes Jul 23, 2025
View reviewed changes
@encukou
encukou enabled auto-merge (squash) July 23, 2025 15:55
@encukou
encukou merged commit 777159f into python:main Jul 23, 2025
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Jul 23, 2025
@bedevere-app bedevere-app Bot removed the awaiting merge label Jul 23, 2025
@AA-Turner AA-Turner added needs backport to 3.13 only security fixes needs backport to 3.14 bugs and security fixes labels Jul 23, 2025
@miss-islington-app

miss-islington-app Bot commented Jul 23, 2025

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app

miss-islington-app Bot commented Jul 23, 2025

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 23, 2025
@encukou @blaisep
@StanFromIreland @AA-Turner @miss-islington
pythongh-135676: Lexical analysis: Reword String literals and related…
7a1a8cd
… sections (pythonGH-135942)

(cherry picked from commit 777159f)

Co-authored-by: Petr Viktorin <[email protected]>
Co-authored-by: Blaise Pabon <[email protected]>
Co-authored-by: Stan Ulbrych <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
@miss-islington-app

miss-islington-app Bot commented Jul 23, 2025

Copy link
Copy Markdown

Sorry, @encukou, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 777159fa318f39c36ad60039cdf35a8dbb319637 3.13
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app miss-islington-app Bot assigned encukou Jul 23, 2025
@bedevere-app

bedevere-app Bot commented Jul 23, 2025

Copy link
Copy Markdown

GH-137048 is a backport of this pull request to the 3.14 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jul 23, 2025
@encukou
encukou deleted the lex-analysis-strings branch July 23, 2025 16:08
hugovk pushed a commit that referenced this pull request Jul 23, 2025
@miss-islington @encukou
@blaisep @StanFromIreland @AA-Turner
[3.14] gh-135676: Lexical analysis: Reword String literals and relate…
4832cea
…d sections (GH-135942) (#137048)

Co-authored-by: Petr Viktorin <[email protected]>
Co-authored-by: Blaise Pabon <[email protected]>
Co-authored-by: Stan Ulbrych <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
@bedevere-bot

bedevere-bot commented Jul 23, 2025

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 FreeBSD Refleaks 3.14 (tier-3) has failed when building commit 4832cea.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1800/builds/367) and take a look at the build logs.
  4. Check if the failure is related to this commit (4832cea) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1800/builds/367

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "/buildbot/buildarea/3.14.ware-freebsd.refleak/build/Lib/test/support/__init__.py", line 830, in gc_collect
    gc.collect()
ResourceWarning: unclosed <socket.socket fd=10, family=2, type=1, proto=6, laddr=('127.0.0.1', 48354), raddr=('127.0.0.1', 48355)>
Task was destroyed but it is pending!
task: <Task pending name='Task-3613' coro=<BaseSelectorEventLoop._accept_connection2() done, defined at /buildbot/buildarea/3.14.ware-freebsd.refleak/build/Lib/asyncio/selector_events.py:217> wait_for=<Future pending cb=[Task.task_wakeup()]>>
Warning -- Unraisable exception
Exception ignored while calling deallocator <function _SelectorTransport.__del__ at 0x8385dc890>:
Traceback (most recent call last):
  File "/buildbot/buildarea/3.14.ware-freebsd.refleak/build/Lib/asyncio/selector_events.py", line 873, in __del__
    _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
ResourceWarning: unclosed transport <_SelectorSocketTransport closing fd=10>
k


Traceback (most recent call last):
  File "/buildbot/buildarea/3.14.ware-freebsd.refleak/build/Lib/test/support/__init__.py", line 830, in gc_collect
    gc.collect()
ResourceWarning: unclosed <socket.socket fd=9, family=2, type=1, proto=6, laddr=('127.0.0.1', 58513), raddr=('127.0.0.1', 58514)>
Task was destroyed but it is pending!
task: <Task pending name='Task-3372' coro=<BaseSelectorEventLoop._accept_connection2() done, defined at /buildbot/buildarea/3.14.ware-freebsd.refleak/build/Lib/asyncio/selector_events.py:217> wait_for=<Future pending cb=[Task.task_wakeup()]>>
Warning -- Unraisable exception
Exception ignored while calling deallocator <function _SelectorTransport.__del__ at 0x841c431d0>:
Traceback (most recent call last):
  File "/buildbot/buildarea/3.14.ware-freebsd.refleak/build/Lib/asyncio/selector_events.py", line 873, in __del__
    _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
ResourceWarning: unclosed transport <_SelectorSocketTransport closing fd=9>
k


Traceback (most recent call last):
  File "/buildbot/buildarea/3.14.ware-freebsd.refleak/build/Lib/test/support/__init__.py", line 830, in gc_collect
    gc.collect()
ResourceWarning: unclosed <socket.socket fd=10, family=2, type=1, proto=6, laddr=('127.0.0.1', 57913), raddr=('127.0.0.1', 57914)>
Task was destroyed but it is pending!
task: <Task pending name='Task-88' coro=<BaseSelectorEventLoop._accept_connection2() done, defined at /buildbot/buildarea/3.14.ware-freebsd.refleak/build/Lib/asyncio/selector_events.py:217> wait_for=<Future pending cb=[Task.task_wakeup()]>>
Warning -- Unraisable exception
Exception ignored while calling deallocator <function _SelectorTransport.__del__ at 0x841c431d0>:
Traceback (most recent call last):
  File "/buildbot/buildarea/3.14.ware-freebsd.refleak/build/Lib/asyncio/selector_events.py", line 873, in __del__
    _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
ResourceWarning: unclosed transport <_SelectorSocketTransport closing fd=10>
k
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 2025
@encukou @blaisep
@StanFromIreland @AA-Turner @taegyunkim
pythongh-135676: Lexical analysis: Reword String literals and related…
8835e82
… sections (pythonGH-135942)

Co-authored-by: Blaise Pabon <[email protected]>
Co-authored-by: Stan Ulbrych <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
@AA-Turner AA-Turner mentioned this pull request Aug 4, 2025
gh-132661: PEP 750 documentation: second pass #137020
Merged
@encukou encukou mentioned this pull request Aug 6, 2025
gh-135676: Reword the f-string (and t-string) section #137469
Merged
@serhiy-storchaka

serhiy-storchaka commented Aug 14, 2025

Copy link
Copy Markdown
Member

Reminder about backporting. @encukou

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@encukou encukou removed the needs backport to 3.13 only security fixes label Aug 15, 2025
Agent-Hellboy pushed a commit to Agent-Hellboy/cpython that referenced this pull request Aug 19, 2025
@encukou @blaisep
@StanFromIreland @AA-Turner @Agent-Hellboy
pythongh-135676: Lexical analysis: Reword String literals and related…
f5de681
… sections (pythonGH-135942)

Co-authored-by: Blaise Pabon <[email protected]>
Co-authored-by: Stan Ulbrych <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
kumaraditya303 pushed a commit to miss-islington/cpython that referenced this pull request Sep 9, 2025
@miss-islington @encukou
@blaisep @StanFromIreland @AA-Turner @kumaraditya303
[3.14] pythongh-135676: Lexical analysis: Reword String literals and …
72e6ce4
…related sections (pythonGH-135942) (python#137048)

Co-authored-by: Petr Viktorin <[email protected]>
Co-authored-by: Blaise Pabon <[email protected]>
Co-authored-by: Stan Ulbrych <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@StanFromIreland StanFromIreland StanFromIreland left review comments
@AA-Turner AA-Turner AA-Turner approved these changes
@willingc willingc Awaiting requested review from willingc willingc is a code owner
+1 more reviewer
@davepeck davepeck davepeck left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@encukou encukou

Labels

docs Documentation in the Doc dir skip news

Projects

Docs PRs
Status: Done

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@encukou @bedevere-bot @serhiy-storchaka @davepeck @AA-Turner @StanFromIreland
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.