[issue28145] Fix whitespace in C source code

2016-09-17 Thread Francisco Couzo

Francisco Couzo added the comment:

I'm closing this issue since I've created new issues for each case, please 
refer to #28184, #28185, and #28186.

--
status: open -> closed

___
Python tracker 

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



[issue28145] Fix whitespace in C source code

2016-09-16 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See also issue15550 and issue8912.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue28145] Fix whitespace in C source code

2016-09-16 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Converting tabs to spaces and deleting trailing whitespace are separate issues 
and should be discussed and possibly done separately.

I think trailing whitespace should be uniformly fixed and prohibited for C 
files as it seems to be for most other files, for reasons including the issue 
cited by Mark.  I seems silly that one should be faced with either reverting 
changes by a mandated fixup program or pushing a somewhat messy patch.  

Does the repository check and reject new and changed lines with trailing 
whitespace, as it does for other file types?  If so, then existing lines with 
whitespace are a trap for someone who makes a small change (such as '<=' to 
'<') and forgets to run patchcheck.

I think generated code should also be generated without whitespace and I would 
also make this a separate patch.  The review mindset for substantive code 
change is different from review of changes that must not make a substantive 
change.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue28145] Fix whitespace in C source code

2016-09-15 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2a97b5ab6132 by Martin Panter in branch '2.7':
Issue #28145: Spelling fixes
https://hg.python.org/cpython/rev/2a97b5ab6132

New changeset 02dd99aeba7d by Martin Panter in branch '3.5':
Issue #28145: Spelling fixes
https://hg.python.org/cpython/rev/02dd99aeba7d

New changeset 87de1f12c41c by Martin Panter in branch '3.6':
Issue #28145: Merge spelling fixes from 3.5 into 3.6
https://hg.python.org/cpython/rev/87de1f12c41c

New changeset 4a35699e7b05 by Martin Panter in branch 'default':
Issue #28145: Merge spelling fixes from 3.6
https://hg.python.org/cpython/rev/4a35699e7b05

--
nosy: +python-dev

___
Python tracker 

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



[issue28145] Fix whitespace in C source code

2016-09-14 Thread R. David Murray

R. David Murray added the comment:

A while ago Antoine fixed the leading tabs throughout the C source, after 
considerable debate about it.  So we've been down this road before.  Since I 
don't touch the C code often, I don't really have an opinion on this one way or 
the other :)

--
nosy: +r.david.murray

___
Python tracker 

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



[issue28145] Fix whitespace in C source code

2016-09-14 Thread Mark Dickinson

Mark Dickinson added the comment:

It's also worth noting that "make patchcheck", which we're encouraged to use by 
the Python developer's guide, autofixes these whitespace issues. I find that 
somewhat annoying, since "make patchcheck" makes changes unrelated to the patch 
I'm committing, which I then have to manually undo. But if the codebase were 
clean with respect to these whitespace issues, that wouldn't be a problem.

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue28145] Fix whitespace in C source code

2016-09-14 Thread Josh Rosenberg

Josh Rosenberg added the comment:

Well, it's trading one person's style for the PEP7 official style, so it's not 
completely arbitrary.

That said, I'm not sure it's justifiable to apply to the entire historic code 
base; my impression was that PEP7 was not intended to be applied retroactively 
in bulk, per the second reason not to obey a rule:

"To be consistent with surrounding code that also breaks it (maybe for historic 
reasons) -- although this is also an opportunity to clean up someone else's 
mess (in true XP style)."

--
nosy: +josh.r

___
Python tracker 

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



[issue28145] Fix whitespace in C source code

2016-09-14 Thread Martin Panter

Martin Panter added the comment:

What is the reasoning behind this? It seems like trading one person’s style, 
fashion, or editor settings for another. I think it is better to just tolerate 
existing styles, unless they cause significant problems. But maybe see what 
other people think.

The disadvantages of any change include adding extra noise to the history, 
conflicts with other patches people write, potential for error.

I am happy to commit your spelling fix though.

--
nosy: +martin.panter

___
Python tracker 

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



[issue28145] Fix whitespace in C source code

2016-09-14 Thread Francisco Couzo

New submission from Francisco Couzo:

I changed most of the tabs in the source code to spaces, and removed trailing 
whitespace.

I also made some scripts that generate code use spaces and not generate 
trailing whitespace. (makesetup and makeunicodedata.py)

I fixed a typo in Modules/makesetup (I don't know if I should open another 
issue, if so please tell me)

I think by changing line Tools/unicode/makeunicodedata.py:1260 to 
file.write(s.strip() + "\n") the trailing whitespace in unicodename_db.h and 
unicodedata_db.h would be fixed, but I didn't put that change in the patch 
because I couldn't test it.

I couldn't find where Parser/asdl_c.py is generating the trailing spaces for 
Python-ast.h

--
files: fix_whitespace.patch
keywords: patch
messages: 276414
nosy: franciscouzo
priority: normal
severity: normal
status: open
title: Fix whitespace in C source code
versions: Python 3.7
Added file: http://bugs.python.org/file44657/fix_whitespace.patch

___
Python tracker 

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