Skip to content

bpo-38862: IDLE Strip Trailing Whitespace fixes end newlines #17366

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

Merged
merged 9 commits into from
Nov 24, 2019

Conversation

terryjreedy
Copy link
Member

@terryjreedy terryjreedy commented Nov 24, 2019

Extra newlines are removed at the end of non-shell files. If the file only has newlines after stripping other trailing whitespace, all are removed, as is done by patchcheck.py.

https://bugs.python.org/issue38862

A non-blank non-shell window should end with exactly one newline
following something other than space, tab, or newline.  It should
then be ready to commit to the cpython repository.
@terryjreedy
Copy link
Member Author

I think that this is ready to merge, but will wait half a day before doing so and moving on to invoking rstrip on save.

@terryjreedy
Copy link
Member Author

terryjreedy commented Nov 24, 2019

Spec was revised after patchcheck experiment. See bpo-36682.

Copy link
Contributor

@taleinat taleinat left a comment

Choose a reason for hiding this comment

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

Looks good Terry, just a few small comments for your consideration.

Copy link
Contributor

@taleinat taleinat left a comment

Choose a reason for hiding this comment

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

LGTM

@terryjreedy terryjreedy merged commit 6bf644e into python:master Nov 24, 2019
@terryjreedy terryjreedy deleted the endlines branch November 24, 2019 21:29
@miss-islington
Copy link
Contributor

Thanks @terryjreedy for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 24, 2019
…H-17366)

Extra newlines are removed at the end of non-shell files. If the file only has newlines after stripping other trailing whitespace, all are removed, as is done by patchcheck.py.
(cherry picked from commit 6bf644e)

Co-authored-by: Terry Jan Reedy <[email protected]>
@bedevere-bot
Copy link

GH-17370 is a backport of this pull request to the 3.8 branch.

@bedevere-bot
Copy link

GH-17371 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 24, 2019
…H-17366)

Extra newlines are removed at the end of non-shell files. If the file only has newlines after stripping other trailing whitespace, all are removed, as is done by patchcheck.py.
(cherry picked from commit 6bf644e)

Co-authored-by: Terry Jan Reedy <[email protected]>
@python python deleted a comment Nov 24, 2019
@python python deleted a comment Nov 25, 2019
@miss-islington
Copy link
Contributor

Thanks @terryjreedy for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@miss-islington
Copy link
Contributor

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

@miss-islington
Copy link
Contributor

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

@miss-islington
Copy link
Contributor

Sorry, @terryjreedy, I could not cleanly backport this to 2.7 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 6bf644ec82f14cceae68278dc35bafb00875efae 2.7

@miss-islington
Copy link
Contributor

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

@miss-islington
Copy link
Contributor

Sorry @terryjreedy, I had trouble checking out the 3.7 backport branch.
Please backport using cherry_picker on command line.
cherry_picker 6bf644ec82f14cceae68278dc35bafb00875efae 3.7

terryjreedy added a commit to terryjreedy/cpython that referenced this pull request Nov 25, 2019
…ythonGH-17366)

Extra newlines are removed at the end of non-shell files. If the file only has newlines after stripping other trailing whitespace, all are removed, as is done by patchcheck.py.
(cherry picked from commit 6bf644e)

Co-authored-by: Terry Jan Reedy <[email protected]>
@bedevere-bot
Copy link

GH-17379 is a backport of this pull request to the 3.7 branch.

terryjreedy added a commit to terryjreedy/cpython that referenced this pull request Nov 25, 2019
…ythonGH-17366)

Extra newlines are removed at the end of non-shell files. If the file only has newlines after stripping other trailing whitespace, all are removed, as is done by patchcheck.py.
(cherry picked from commit 6bf644e)

Co-authored-by: Terry Jan Reedy <[email protected]>
terryjreedy added a commit that referenced this pull request Nov 27, 2019
…H-17366) (#17379)

Extra newlines are removed at the end of non-shell files. If the file only has newlines after stripping other trailing whitespace, all are removed, as is done by patchcheck.py.
(cherry picked from commit 6bf644e)

Co-authored-by: Terry Jan Reedy <[email protected]>
terryjreedy added a commit that referenced this pull request Nov 27, 2019
…H-17366)

Extra newlines are removed at the end of non-shell files. If the file only has newlines after stripping other trailing whitespace, all are removed, as is done by patchcheck.py.
(cherry picked from commit 6bf644e)

Co-authored-by: Terry Jan Reedy <[email protected]>
jacobneiltaylor pushed a commit to jacobneiltaylor/cpython that referenced this pull request Dec 5, 2019
…GH-17366)

Extra newlines are removed at the end of non-shell files. If the file only has newlines after stripping other trailing whitespace, all are removed, as is done by patchcheck.py.
shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request Jan 31, 2020
…GH-17366)

Extra newlines are removed at the end of non-shell files. If the file only has newlines after stripping other trailing whitespace, all are removed, as is done by patchcheck.py.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-feature A feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants