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: [3.5 Regression] unable to byte-compile the attached IN.py
Type: behavior Stage: resolved
Components: Interpreter Core Versions: Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: yselivanov Nosy List: Arfrever, doko, gvanrossum, larry, ncoghlan, python-dev, yselivanov
Priority: release blocker Keywords:

Created on 2015-05-18 12:32 by doko, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
IN.py doko, 2015-05-18 12:32
Messages (7)
msg243472 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2015-05-18 12:32
seen while byte-compiling the attached IN.py on x86_64-linux-gnu.

$ python3.5 -m py_compile IN.py 
Sorry: IndentationError: too many levels of indentation (IN.py, line 806)

the very same IN.py is accepted by 3.4.
msg243473 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2015-05-18 12:58
looks like a parser issue:

$ for i in $(seq 200); do echo "def f$i(x): return (x)" >> foo.py; done
$ python3.5 -m py_compile foo.py 
Sorry: IndentationError: too many levels of indentation (foo.py, line 100)

$ for i in $(seq 200); do echo "def f$i(x):">>bar.py; echo "    return (x)" >> bar.py; done
$ python3.5 -m py_compile bar.py
msg243475 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2015-05-18 13:10
this seems to be caused by the PEP 492 merge in r95969.
msg243496 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-05-18 16:51
New changeset fb5fcae0cf1f by Yury Selivanov in branch 'default':
Issue 24226: Fix parsing of many sequential one-line 'def' statements.
https://hg.python.org/cpython/rev/fb5fcae0cf1f
msg243497 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2015-05-18 16:52
Arfrever, Matthias, 
Thanks for reporting this issue.  It should now be fixed.  Please verify that it works for your usecase.
msg243503 - (view) Author: Arfrever Frehtes Taifersar Arahesis (Arfrever) * (Python triager) Date: 2015-05-18 17:27
This change works for me.
msg243504 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2015-05-18 17:28
Thanks! Closing the issue.
History
Date User Action Args
2022-04-11 14:58:17adminsetnosy: + larry
github: 68414
2015-05-18 17:28:41yselivanovsetstatus: open -> closed
resolution: fixed
messages: + msg243504

stage: resolved
2015-05-18 17:27:54Arfreversetmessages: + msg243503
2015-05-18 16:52:42yselivanovsetnosy: + gvanrossum, ncoghlan
messages: + msg243497
2015-05-18 16:51:00python-devsetnosy: + python-dev
messages: + msg243496
2015-05-18 15:26:45zach.waresetpriority: normal -> release blocker
assignee: yselivanov

type: behavior
nosy: + Arfrever
2015-05-18 15:25:42zach.warelinkissue24227 superseder
2015-05-18 13:11:06dokosetcomponents: + Interpreter Core, - Library (Lib)
2015-05-18 13:10:27dokosetnosy: + yselivanov
messages: + msg243475
2015-05-18 12:58:24dokosetmessages: + msg243473
2015-05-18 12:32:54dokosetfiles: + IN.py
2015-05-18 12:32:32dokocreate