This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Misleading Indentation in C source code
Type: Stage: resolved
Components: Versions: Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: martin.panter Nosy List: franciscouzo, martin.panter, python-dev, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2016-09-14 00:49 by franciscouzo, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
misleading_indentation.patch franciscouzo, 2016-09-14 00:49 review
indent.patch martin.panter, 2016-09-16 01:47 review
indent.py3.patch martin.panter, 2016-09-16 01:47 review
Messages (5)
msg276367 - (view) Author: Francisco Couzo (franciscouzo) * Date: 2016-09-14 00:49
Fixed the warnings that appear when compiling 2.7 with -Wmisleading-indentation (Included in -Wall since GCC 6).

Kinda related, though I don't think there would be too much interest in fixing it (all the tabs in Python's C source):
$ find . -name '*.c' -print0 | xargs -0 grep -R $'\t' | wc -l
10407
msg276375 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-09-14 04:49
New changeset 4d91f5c2ef99 by Benjamin Peterson in branch '2.7':
fix misleading indentation (closes #28139)
https://hg.python.org/cpython/rev/4d91f5c2ef99
msg276657 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-09-16 01:39
.
I found more messed up indentation looking through Antoine’s large “untabify” commit r81029. These don’t trigger compiler warnings, but I think it may be worth restoring them.
msg276687 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-09-16 09:28
In general LGTM. This is not cosmetic change, this fixes readability of the sources. But I left few comments on Rietveld.
msg276777 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-09-17 08:02
New changeset a2bfec367cef by Martin Panter in branch '2.7':
Issue #28139: Fix messed up indentation
https://hg.python.org/cpython/rev/a2bfec367cef

New changeset 0e2a891639dd by Martin Panter in branch '3.5':
Issue #28139: Fix messed up indentation
https://hg.python.org/cpython/rev/0e2a891639dd

New changeset 1e052a70a70a by Martin Panter in branch '3.6':
Issue #28139: Merge indentation fixes from 3.5 into 3.6
https://hg.python.org/cpython/rev/1e052a70a70a

New changeset c49084a28969 by Martin Panter in branch 'default':
Issue #28139: Merge indentation fixes from 3.6
https://hg.python.org/cpython/rev/c49084a28969
History
Date User Action Args
2022-04-11 14:58:36adminsetgithub: 72326
2016-09-17 13:35:54martin.pantersetstatus: open -> closed
stage: patch review -> resolved
2016-09-17 08:03:00python-devsetmessages: + msg276777
2016-09-17 04:23:52serhiy.storchakalinkissue28185 dependencies
2016-09-16 09:28:38serhiy.storchakasetassignee: martin.panter

messages: + msg276687
nosy: + serhiy.storchaka
2016-09-16 01:47:57martin.pantersetfiles: + indent.py3.patch
2016-09-16 01:47:48martin.pantersetfiles: + indent.patch
2016-09-16 01:39:04martin.pantersetstatus: closed -> open

nosy: + martin.panter
messages: + msg276657

stage: resolved -> patch review
2016-09-14 04:49:06python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg276375

resolution: fixed
stage: resolved
2016-09-14 01:25:12ppperrysettitle: Misleading Indentation -> Misleading Indentation in C source code
2016-09-14 00:49:26franciscouzocreate