Skip to content
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

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

Merged
merged 9 commits into from Nov 24, 2019

Conversation

@terryjreedy
Copy link
Member

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

terryjreedy added 5 commits Nov 24, 2019
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

This comment has been minimized.

Copy link
Member Author

terryjreedy commented Nov 24, 2019

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

This comment has been minimized.

Copy link
Member Author

terryjreedy commented Nov 24, 2019

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

Copy link
Contributor

taleinat left a comment

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

Lib/idlelib/idle_test/mock_idle.py Show resolved Hide resolved
Lib/idlelib/idle_test/test_format.py Outdated Show resolved Hide resolved
Copy link
Contributor

taleinat left a comment

LGTM

@terryjreedy terryjreedy merged commit 6bf644e into python:master Nov 24, 2019
4 checks passed
4 checks passed
Azure Pipelines PR #20191124.8 succeeded
Details
bedevere/issue-number Issue number 38862 found
Details
bedevere/news News entry found in Misc/NEWS.d
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@terryjreedy terryjreedy deleted the terryjreedy:endlines branch Nov 24, 2019
@miss-islington

This comment has been minimized.

Copy link

miss-islington commented Nov 24, 2019

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

miss-islington added 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 <tjreedy@udel.edu>
@bedevere-bot

This comment has been minimized.

Copy link

bedevere-bot commented Nov 24, 2019

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

@bedevere-bot

This comment has been minimized.

Copy link

bedevere-bot commented Nov 24, 2019

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

miss-islington added 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 <tjreedy@udel.edu>
@python python deleted a comment Nov 24, 2019
@python python deleted a comment Nov 25, 2019
@miss-islington

This comment has been minimized.

Copy link

miss-islington commented Nov 25, 2019

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

This comment has been minimized.

Copy link

miss-islington commented Nov 25, 2019

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

@miss-islington

This comment has been minimized.

Copy link

miss-islington commented Nov 25, 2019

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

@miss-islington

This comment has been minimized.

Copy link

miss-islington commented Nov 25, 2019

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

This comment has been minimized.

Copy link

miss-islington commented Nov 25, 2019

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

@miss-islington

This comment has been minimized.

Copy link

miss-islington commented Nov 25, 2019

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 <tjreedy@udel.edu>
@bedevere-bot

This comment has been minimized.

Copy link

bedevere-bot commented Nov 25, 2019

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 <tjreedy@udel.edu>
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 <tjreedy@udel.edu>
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 <tjreedy@udel.edu>
jacobneiltaylor added 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.