Issue1815116

classification
Title: Patch for [ 1815110 ] eval and excec should accept mapping
Type: Severity: normal
Components: Core Versions:
Milestone:
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: fwierzbicki Nosy List: fwierzbicki, mehendran
Priority: normal Keywords: patch

Created on 2007-10-17.13:12:46 by mehendran, last changed 2009-03-03.01:44:59 by fwierzbicki.

Files
File name Uploaded Description Edit Remove
eval_exec_upgraded.diff mehendran, 2007-10-17.13:12:46 eval, exec functions got upgraded
Messages
msg2932 (view) Author: Mehendran (mehendran) Date: 2007-10-17.13:12:46
Patch is uploaded for the bug id [1815110]. The eval,
execfile functions now accept any mapping type for the 
locals parameter. Previously this had to be a regular 
Python dictionary.

test_builtin.py is the testcase file. I copied the
test_general_eval and test_execfile testcases from 
cpython. I did one change, which I moved 'unlink(TESTFN)'
statement before 'import os' statement in test_execfile,
as it was giving FileNotFound error.
msg2933 (view) Author: Mehendran (mehendran) Date: 2007-10-17.13:18:16
globals() builtin function returns StringMap in jython, but dict type in CPython.
So I relaxed the condition as in the following.

541 if (globals != null && 
542    !(globals instanceof PyDictionary || globals instanceof PyStringMap)) {
       ----
       ----
547 }
msg4171 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2009-03-03.01:44:58
Thanks Mehendran,

I have merged the unit tests into test_builtin_jy.py.  I haven't used
your fix as the codebase was fixed in a slightly different way (and so
far we have decided to be less strict about globals() being a true dict)
History
Date User Action Args
2009-03-03 01:44:59fwierzbickisetstatus: open -> closed
resolution: accepted
messages: + msg4171
2008-12-15 15:55:11fwierzbickisetcomponents: + Core, - None
2008-12-15 15:55:03fwierzbickisetassignee: fwierzbicki
nosy: + fwierzbicki
2007-10-17 13:12:46mehendrancreate