Uh oh!
There was an error while loading. Please reload this page.
gh-130167: Add a What's New entry for changes to textwrap.{de,in}dent - #131924
Conversation
picnixz
left a comment
There was a problem hiding this comment.
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?
| characters other than space and tab. | ||
There was a problem hiding this comment.
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.
textwrap.dedenttextwrap.dedentUh oh!
There was an error while loading. Please reload this page.
| * 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 |
There was a problem hiding this comment.
Maybe use two separate bullet points for that? so that the reader is able to distinguish between a performance improvement and a behavioral change.
There was a problem hiding this comment.
Where should the second one go? Improved Modules is mainly for features, and a standalone bullet about the bugfix in Optimisations feels wrong.
There was a problem hiding this comment.
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)
textwrap.dedenttextwrap.{de,in}denttextwrap.{de,in}denttextwrap.{de,in}dentpicnixz
commented
Apr 17, 2025
@AA-Turner Can you also include the typo fix of the NEWS entry (https://github.com/python/cpython/pull/131923/files#r2044429846)? TiA |
hugovk
commented
Jun 27, 2025
Reminder for this :) |
serhiy-storchaka
left a comment
There was a problem hiding this comment.
LGTM. I have no opinion about normalised/normalized, please came to some conclusion.
Uh oh!
There was an error while loading. Please reload this page.
hugovk
commented
Dec 28, 2025
(Was fixed in #132666) |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Thanks @AA-Turner for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
…,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>
GH-143292 is a backport of this pull request to the 3.14 branch. |
…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>
…,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>
📚 Documentation preview 📚: https://cpython-previews--131924.org.readthedocs.build/
reuses #130167