kmonsoor / pyglet

Automatically exported from code.google.com/p/pyglet
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Py3 compatibility code in test.py conflicts with 2to3 #726

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Have you tried Pyglet 1.2 alpha1 or the repository code?
default branch, changeset: 
https://code.google.com/p/pyglet/source/detail?r=9781eb46dca2, Thu Apr 03 
19:13:36 2014 +0100
using Python 3.3.5

What steps will reproduce the problem?
1. apply 2to3
2. run tests/test.py font
3. press return to begin test

Paste in the traceback or error message:
Traceback (most recent call last):
  File "./test.py", line 603, in <module>
    main()
  File "./test.py", line 597, in main
    if not plan.run(options, args):
  File "./test.py", line 431, in run
    component.test(options)
  File "./test.py", line 353, in test
    child.test(options)
  File "./test.py", line 353, in test
    child.test(options)
  File "./test.py", line 293, in test
    prompt('Press return to begin test...')
  File "./test.py", line 217, in prompt
    return eval(input(message))
  File "<string>", line 0

    ^
SyntaxError: unexpected EOF while parsing

Problem:
`input(message)` got translated to `eval(input(message))` by 2to3 and eval 
fails to parse an empty input (return).

Proposed fix:
fix_test_prompt.patch: Remove the version conditional prompt() code and let 
2to3 to handle the raw_input() -> input() conversion.

Original issue reported on code.google.com by Risimi...@gmail.com on 4 Apr 2014 at 11:36

Attachments:

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 1fb79ae476eb.

Original comment by useboxnet on 17 Apr 2014 at 6:50