Author vstinner
Recipients barry, dlitz, jmfauth, ocean-city, pitrou, vstinner
Date 2008-09-26.16:11:49
SpamBayes Score 4.22925e-08
Marked as misclassified No
Message-id <1222445510.68.0.756947452259.issue2384@psf.upfronthosting.co.za>
In-reply-to
Content
Oh! My patch breaks "python -m". The problem is maybe no in the token 
parser but... somewhere else?
--- test.py ---
# coding: ASCII
raise Exception("line 2")
# try again!
---------------

Python 3.0 trunk unpatched:
---
$ ./python test.py
Traceback (most recent call last):
  File "test.py", line 3, in <module>

$ ./python -m test
Traceback (most recent call last):
  File "/home/haypo/prog/py3k/Lib/runpy.py", line 121, in 
_run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/home/haypo/prog/py3k/Lib/runpy.py", line 34, in _run_code
    exec(code, run_globals)
  File "/home/haypo/prog/py3k/test.py", line 2, in <module>
    raise Exception("line 2")
Exception: line 2
---

Python 3.0 trunk + tokenizer-coding.patch:
---
marge$ ./python test.py
Traceback (most recent call last):
  File "test.py", line 2, in <module>
    raise Exception("line 2")
Exception: line 2

Traceback (most recent call last):
  File "/home/haypo/prog/py3k/Lib/runpy.py", line 121, in 
_run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/home/haypo/prog/py3k/Lib/runpy.py", line 34, in _run_code
    exec(code, run_globals)
  File "/home/haypo/prog/py3k/test.py", line 1, in <module>
    # coding: ASCII
Exception: line 2
---
History
Date User Action Args
2008-09-26 16:11:50vstinnersetrecipients: + vstinner, barry, pitrou, ocean-city, jmfauth, dlitz
2008-09-26 16:11:50vstinnersetmessageid: <1222445510.68.0.756947452259.issue2384@psf.upfronthosting.co.za>
2008-09-26 16:11:50vstinnerlinkissue2384 messages
2008-09-26 16:11:49vstinnercreate