(original) (raw)
changeset: 82271:c7f04c09dc56 branch: 2.7 parent: 82262:0082b7bf9501 user: R David Murray rdmurray@bitdance.com date: Tue Feb 19 20:00:11 2013 -0500 files: Lib/py_compile.py Misc/NEWS description: #7842: backport fix for py_compile.compile syntax error message handling. diff -r 0082b7bf9501 -r c7f04c09dc56 Lib/py_compile.py --- a/Lib/py_compile.py Mon Feb 18 22:04:59 2013 -0500 +++ b/Lib/py_compile.py Tue Feb 19 20:00:11 2013 -0500 @@ -112,7 +112,7 @@ try: codeobject = __builtin__.compile(codestring, dfile or file,'exec') except Exception,err: - py_exc = PyCompileError(err.__class__,err.args,dfile or file) + py_exc = PyCompileError(err.__class__, err, dfile or file) if doraise: raise py_exc else: diff -r 0082b7bf9501 -r c7f04c09dc56 Misc/NEWS --- a/Misc/NEWS Mon Feb 18 22:04:59 2013 -0500 +++ b/Misc/NEWS Tue Feb 19 20:00:11 2013 -0500 @@ -208,6 +208,8 @@ Library ------- +- Issue #7842: backported fix for py_compile.compile() syntax error handling. + - Issue #13153: Tkinter functions now raise TclError instead of ValueError when a unicode argument contains non-BMP character. /rdmurray@bitdance.com