Skip to content

gh-130167: Add a What's New entry for changes to textwrap.{de,in}dent - #131924

Merged
hugovk merged 4 commits into
python:mainfrom
AA-Turner:tw-dent-docs
Dec 30, 2025
Merged

gh-130167: Add a What's New entry for changes to textwrap.{de,in}dent#131924
hugovk merged 4 commits into
python:mainfrom
AA-Turner:tw-dent-docs

Conversation

@AA-Turner

@AA-TurnerAA-Turner commented Mar 31, 2025

Copy link
Copy Markdown
Member

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

There is a note:

Note that tabs and spaces are both treated as whitespace, but they are not
equal: the lines ``" hello"`` and ``"\thello"`` are considered to have no
common leading whitespace.

The new implementation still guarantees this right?

Comment threadDoc/whatsnew/3.14.rst Outdated
Comment on lines +1081 to +1082
characters other than space and tab.

@picnixzpicnixzMar 31, 2025

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.

Add something like (to be able to see the issue)

 characters other than space and tab.
(Contributed by [...] in :gh:`...`.)

+ 2 blank lines to end the section.

@picnixzpicnixz changed the title Add a What's New entry for the changes to textwrap.dedentgh-130167: Add a What's New entry for the changes to textwrap.dedentMar 31, 2025
Comment threadDoc/library/textwrap.rst Outdated
Comment threadDoc/whatsnew/3.14.rst Outdated

* Optimise the :func:`~textwrap.dedent` function, improving performance by
an average of 2.4x, with larger improvements for bigger inputs,
and fix a bug with incomplete normalization of blank lines with whitespace

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.

Maybe use two separate bullet points for that? so that the reader is able to distinguish between a performance improvement and a behavioral change.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Where should the second one go? Improved Modules is mainly for features, and a standalone bullet about the bugfix in Optimisations feels wrong.

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.

Well, I think it's still an improvement in some sense (even if we didn't treat it as a regular bugfix that we backport). For me I think that the behavioral change is important to note, hence I suggested using two separate bullet points (but still under the same section)

@AA-TurnerAA-Turner changed the title gh-130167: Add a What's New entry for the changes to textwrap.dedentgh-130167: Add a What's New entry for the changes to textwrap.{de,in}dentApr 1, 2025
@AA-TurnerAA-Turner changed the title gh-130167: Add a What's New entry for the changes to textwrap.{de,in}dentgh-130167: Add a What's New entry for changes to textwrap.{de,in}dentApr 1, 2025
@python-cla-bot

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@picnixz

Copy link
Copy Markdown
Member

@AA-Turner Can you also include the typo fix of the NEWS entry (https://github.com/python/cpython/pull/131923/files#r2044429846)? TiA

@hugovkhugovk added the needs backport to 3.14 bugs and security fixes label Jun 27, 2025
@hugovk

Copy link
Copy Markdown
Member

Reminder for this :)

@serhiy-storchakaserhiy-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. I have no opinion about normalised/normalized, please came to some conclusion.

Comment threadDoc/whatsnew/3.14.rst Outdated
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
@hugovk

Copy link
Copy Markdown
Member

@AA-Turner Can you also include the typo fix of the NEWS entry (#131923 (files))? TiA

(Was fixed in #132666)

Comment threadDoc/whatsnew/3.14.rst
Comment threadDoc/whatsnew/3.14.rst
Comment threadDoc/library/textwrap.rst Outdated
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
@hugovk
hugovk merged commit 7e3a5a7 into python:mainDec 30, 2025
28 checks passed
@miss-islington-app

Copy link
Copy Markdown

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

@github-project-automationgithub-project-automationBot moved this from Todo to Done in Docs PRsDec 30, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 30, 2025
…,in}dent`` (pythonGH-131924)
(cherry picked from commit 7e3a5a7)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@bedevere-app

Copy link
Copy Markdown

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

@bedevere-appbedevere-appBot removed the needs backport to 3.14 bugs and security fixes label Dec 30, 2025
hugovk added a commit that referenced this pull request Dec 30, 2025
…e,in}dent`` (GH-131924) (#143292)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
thunder-coding pushed a commit to thunder-coding/cpython that referenced this pull request Feb 15, 2026
…,in}dent`` (python#131924)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docsDocumentation in the Doc dirskip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants

@AA-Turner@picnixz@hugovk@serhiy-storchaka@StanFromIreland