]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Several changes for Jython portability. This closes SF patch
authorBarry Warsaw <barry@python.org>
Fri, 23 Mar 2001 16:13:30 +0000 (16:13 +0000)
committerBarry Warsaw <barry@python.org>
Fri, 23 Mar 2001 16:13:30 +0000 (16:13 +0000)
commitdfdac1af4d323f4f69775794777197ea31d804ef
treee67c36bbf7862539804f324f864b02bbf4285f8e
parent101651c128825a05a7ba7c1c556c90e22bfb86c2
Several changes for Jython portability.  This closes SF patch
#403666.  Specifically,

In codestr, force `c' to be global.  It's unclear what the semantics
should be for a code object compiled at module scope, but bound and
run in a function.  In CPython, `c' is global (by accident?) while in
Jython, `c' is local.  The intent of the test clearly is to make `c'
global, so let's be explicit about it.

Jython also does not have a __builtins__ name in the module's
namespace, so we use a more portable alternative (though I'm not sure
why the test requires "__builtins__" in the g namespace).

Finally, skip the new.code() test if the new module doesn't have a
`code' attribute.  Jython will never have this.
Lib/test/test_new.py