Title: file that breaks 2to3 (despite being correct python)
Type: Stage:
Components: 2to3 (2.x to 3.x conversion tool) Versions:
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: collinwinter Nosy List: amaury.forgeotdarc, collinwinter, fijal, grubert, mhammond, nedds, rbp
Priority: normal Keywords:

Created on 2008-04-02 00:10 by fijal, last changed 2008-10-03 17:08 by collinwinter. This issue is now closed.

File name Uploaded Description Edit fijal, 2008-04-02 00:10
Messages (8)
msg64829 - (view) Author: Maciek Fijalkowski (fijal) Date: 2008-04-02 00:10
Infinite recursion problem. I know this file is obscure, but it's still
pretty valid python.
msg64841 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008-04-02 09:42
Testing with a much simpler file ("a = 0\n" * 1000), there is a limit to
the number of statements in one file, around (sys.recursionlimit - 24).
msg64863 - (view) Author: Collin Winter (collinwinter) * (Python committer) Date: 2008-04-02 15:34
Yes, this is a known problem with the pattern matching system.
msg69966 - (view) Author: Nick Edds (nedds) Date: 2008-07-18 18:35
My iterative pattern matching doesn't break on this file, but as
mentioned elsewhere, the iterative solution is slower. I'll work on
speeding it up, but I don't immediately see a good way to do so. Any
ideas would be greatly appreciated.
msg70006 - (view) Author: engelbert gruber (grubert) * Date: 2008-07-19 06:39
The much simpler input might be another problem::

  # this is accepted
  b = ("a = 0\n" * 100)
  # this one breaks it
  ("a = 0\n" * 100)

this looks similar to ``map(None, t)`` on a line by itself is 
translated to ``list(map(None, t))`` and the message "You should use a 
for loop her"
msg70091 - (view) Author: engelbert gruber (grubert) * Date: 2008-07-20 21:05
Truncating the file to 2448 lines helps, seams to be a size not content 

All fixes work exept .

And removing the lines ::

  mod=file_input< any+ >

makes even this run through.
msg74013 - (view) Author: Mark Hammond (mhammond) * (Python committer) Date: 2008-09-29 07:06
pywin32 has a number of files that break in this way - often files
generated by
msg74262 - (view) Author: Collin Winter (collinwinter) * (Python committer) Date: 2008-10-03 17:08
Fixed in r66775.
Date User Action Args
2008-10-03 17:08:49collinwintersetstatus: open -> closed
resolution: fixed
messages: + msg74262
2008-09-29 07:06:47mhammondsetnosy: + mhammond
messages: + msg74013
2008-07-20 21:05:06grubertsetmessages: + msg70091
2008-07-19 06:39:42grubertsetnosy: + grubert
messages: + msg70006
2008-07-18 18:35:37neddssetnosy: + nedds
messages: + msg69966
2008-05-08 04:19:52rbpsetnosy: + rbp
2008-04-02 15:34:46collinwintersetpriority: normal
messages: + msg64863
2008-04-02 09:42:43amaury.forgeotdarcsetnosy: + amaury.forgeotdarc
messages: + msg64841
2008-04-02 00:10:13fijalcreate