Message73857
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
--- |
|
Date |
User |
Action |
Args |
2008-09-26 16:11:50 | vstinner | set | recipients:
+ vstinner, barry, pitrou, ocean-city, jmfauth, dlitz |
2008-09-26 16:11:50 | vstinner | set | messageid: <1222445510.68.0.756947452259.issue2384@psf.upfronthosting.co.za> |
2008-09-26 16:11:50 | vstinner | link | issue2384 messages |
2008-09-26 16:11:49 | vstinner | create | |
|