[issue21591] exec(a, b, c) not the same as exec a in b, c in nested functions

2014-08-10 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: test_excinfo_no_python_sourcecode of py now passes. -- resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21591

[issue21591] exec(a, b, c) not the same as exec a in b, c in nested functions

2014-08-10 Thread Dirkjan Ochtman
Dirkjan Ochtman added the comment: Thanks, Benjamin, for reverting the run-time bits. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21591 ___

[issue21591] exec(a, b, c) not the same as exec a in b, c in nested functions

2014-08-10 Thread Nick Coghlan
Nick Coghlan added the comment: Given that our test suite missed the regression originally, it would be nice to have a test case that directly built an AST that relies on the runtime check. -- ___ Python tracker rep...@bugs.python.org

[issue21591] exec(a, b, c) not the same as exec a in b, c in nested functions

2014-08-09 Thread Dirkjan Ochtman
Dirkjan Ochtman added the comment: I can take a look at the py failure next week. Keeping the run-time compatibility code seems sensible, but I'm not sure if it'd fix the py test? I don't think reverting the changes at this point is warranted. --

[issue21591] exec(a, b, c) not the same as exec a in b, c in nested functions

2014-08-09 Thread Nick Coghlan
Nick Coghlan added the comment: Agreed reverting isn't necessary - main thing is to figure out what went wrong in the py test suite and come up with a new test case that covers it. The reason I suspect it's the missing runtime check that's causing the py problem is because (as far as I am

[issue21591] exec(a, b, c) not the same as exec a in b, c in nested functions

2014-08-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0e9b023078e6 by Benjamin Peterson in branch '2.7': restore runtime exec test (#21591) http://hg.python.org/cpython/rev/0e9b023078e6 -- ___ Python tracker rep...@bugs.python.org

[issue21591] exec(a, b, c) not the same as exec a in b, c in nested functions

2014-08-04 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: Commit 33fb5600e9a1 causes 1 test failure in test suite of py (https://pypi.python.org/pypi/py). Test suite of py requires pytest (https://pypi.python.org/pypi/pytest) The failing test (test_excinfo_no_python_sourcecode) requires Jinja

[issue21591] exec(a, b, c) not the same as exec a in b, c in nested functions

2014-08-04 Thread Nick Coghlan
Nick Coghlan added the comment: I suspect there may also be a problem if executing pyc code generated the old way (this patch didn't bump the magic number, and doesn't really need to, so that case still needs to be handled). Restoring the runtime check should cover it (the test can craft a

[issue21591] exec(a, b, c) not the same as exec a in b, c in nested functions

2014-07-30 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- stage: patch review - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21591 ___ ___

[issue21591] exec(a, b, c) not the same as exec a in b, c in nested functions

2014-07-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 33fb5600e9a1 by Dirkjan Ochtman in branch '2.7': Issue #21591: Handle exec backwards compatibility in the AST builder. http://hg.python.org/cpython/rev/33fb5600e9a1 New changeset 6c47c6d2033e by Robert Jordens in branch '2.7': Issue #21591: add

[issue21591] exec(a, b, c) not the same as exec a in b, c in nested functions

2014-07-29 Thread Dirkjan Ochtman
Dirkjan Ochtman added the comment: Thanks to Victor Stinner for the review! -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21591 ___

[issue21591] exec(a, b, c) not the same as exec a in b, c in nested functions

2014-07-25 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21591 ___ ___ Python-bugs-list

[issue21591] exec(a, b, c) not the same as exec a in b, c in nested functions

2014-07-24 Thread Dirkjan Ochtman
Dirkjan Ochtman added the comment: I came up with a patch that shifts the compatibility hack we have for the tuple form of exec from run-time (in exec_statement()) to the CST-to-AST transformation (in ast_for_exec_stmt()). It seems to pass the tests (including the ones Robert pasted in here).

[issue21591] exec(a, b, c) not the same as exec a in b, c in nested functions

2014-07-24 Thread Dirkjan Ochtman
Dirkjan Ochtman added the comment: Oh, one specific question: I'm not sure if I should free the old expr1 (the top-level exec value) before overwriting it with the new one. -- ___ Python tracker rep...@bugs.python.org

[issue21591] exec(a, b, c) not the same as exec a in b, c in nested functions

2014-07-23 Thread Dirkjan Ochtman
Changes by Dirkjan Ochtman dirk...@ochtman.nl: -- nosy: +djc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21591 ___ ___ Python-bugs-list mailing

[issue21591] exec(a, b, c) not the same as exec a in b, c in nested functions

2014-07-22 Thread Guido van Rossum
Guido van Rossum added the comment: This does appear to be a bug. Please research the C code that originates the error message -- there's probably a simple logic mistake. -- nosy: +gvanrossum ___ Python tracker rep...@bugs.python.org

[issue21591] exec(a, b, c) not the same as exec a in b, c in nested functions

2014-07-22 Thread Neil Muller
Neil Muller added the comment: Poking at the source of the error suggests the problem is in symtable.c: The offending logic looks to be (around line 1124 in python 2.7 at revision 91767:4cef7b0ec659): if (s-v.Exec.globals) { ... } else { st-st_cur-ste_unoptimized |= OPT_BARE_EXEC; }

[issue21591] exec(a, b, c) not the same as exec a in b, c in nested functions

2014-05-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: The exception appears to be intentional, though I do not know what a 'qualified' exec would be. But since the tuple form is intended to mimic 3.x exec, and since a reduced version of your example c = ''' def g(): def f(): if True:

[issue21591] exec(a, b, c) not the same as exec a in b, c in nested functions

2014-05-28 Thread Robert Jordens
New submission from Robert Jordens: According to the documentation the exec a in b, c is equivalent to exec(a, b, c). But in the testcase below the tuple form causes a SyntaxError while the statement form works fine. diff -r e770d8c4291c Lib/test/test_compile.py ---