[issue32150] Expand tabs to spaces in C files

2017-11-28 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Thanks Guido!

I think now we can revive issue8912.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32150] Expand tabs to spaces in C files

2017-11-28 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 598ceae876ff4a23072e59945597e945583de4ab by Serhiy Storchaka in 
branch 'master':
bpo-32150: Expand tabs to spaces in C files. (#4583)
https://github.com/python/cpython/commit/598ceae876ff4a23072e59945597e945583de4ab


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32150] Expand tabs to spaces in C files

2017-11-28 Thread Guido van Rossum

Guido van Rossum  added the comment:

OK, so I think you can go ahead with this. I was fine with the state of the 
patch yesterday, so whatever you added today is also fine.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32150] Expand tabs to spaces in C files

2017-11-27 Thread Guido van Rossum

Guido van Rossum  added the comment:

Yeah, some editors don't clean up trailing ws. Even with Emacs it occasionally 
happens to me.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32150] Expand tabs to spaces in C files

2017-11-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Tools/scripts/patchcheck.py does this check. It is used for .py and .rst files, 
and there is issue8912 for applying it to .c/.h files.

patchcheck.py also checks trailing whitespaces. While I and other core 
developers constantly remove trailing whitespaces (the recent clean up is PR 
4130), the new trailing whitespaces are constantly added (for example in PR 
4150).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32150] Expand tabs to spaces in C files

2017-11-27 Thread Guido van Rossum

Guido van Rossum  added the comment:

Maybe we also need (in a separate PR) a git pre-commit hook that prevents tabs 
in the source (except in the few exceptions you left alone).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32150] Expand tabs to spaces in C files

2017-11-27 Thread Guido van Rossum

Guido van Rossum  added the comment:

I think I'm cool with this (even though it will make blame-finding on
GitHub a tad harder -- what's the magic URL appendage again?)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32150] Expand tabs to spaces in C files

2017-11-27 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +4512

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32150] Expand tabs to spaces in C files

2017-11-27 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

While most C files use spaces for indenting and aligning, there are few sites 
in which tabs are left. Sometimes mixed tabs and spaces are used in the same 
file.

This adds a noise in the diff if the committer uses an editor which doesn't 
preserve tabs (see for example PR 4390). This can hide semantic changes in tab 
expansion changes.

I reviewed many patches with accidentally expanded tabs to spaces. Usually I 
request removing unrelated changes from the patch. But this still happened, and 
tabs slowly are disappeared from the sources. There are less tabs in the 
current default branch than in any maintained branch.

I think it is better to make the expansion in a single not so large commit that 
allow them be mixed with semantical changes. PR 4583 does this. The changes 
first were made automatically, and after that I have edited them manually for 
removing excessive indentations in some files (4 spaces are enough). Tabs have 
been kept only in generated file Modules/unicodedata_db.h and in imported files 
Modules/_ctypes/* and Modules/expat/siphash.h.

--
components: Interpreter Core
messages: 307068
nosy: gvanrossum, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Expand tabs to spaces in C files
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com