Roundup Tracker - Issues

Issue 2550707

classification
Incorrect use of __builtins__ in roundup/instance.py
Type: compile error Severity: normal
Components: Database Versions: 1.4
process
Status: closed fixed
:
: : ber, cmeerw
Priority: : patch

Created on 2011-06-21 20:57 by cmeerw, last changed 2011-06-22 12:35 by ber.

Files
File name Uploaded Description Edit Remove
roundup-instance.py.diff cmeerw, 2011-06-21 20:57 proposed patch
Messages
msg4313 Author: [hidden] (cmeerw) Date: 2011-06-21 20:57
__builtins__ is used incorrectly in roundup/instance.py, see http://
docs.python.org/library/__builtin__.html:

CPython implementation detail: Most modules have the name __builtins__ 
(note the 's') made available as part of their globals. The value of 
__builtins__ is normally either this module or the value of this 
modules’s __dict__ attribute. Since this is an implementation detail, 
it may not be used by alternate implementations of Python.

Instead of using __builtins__['open'] it should use __builtin__.open

Note that this issue prevents roundup from working under pypy.
msg4314 Author: [hidden] (ber) Date: 2011-06-22 12:35
Committed to Rev4618.

Christof, thanks for the report, explanation and patch!
Bernhard
History
Date User Action Args
2011-06-22 12:35:35bersetstatus: new -> closed
resolution: fixed
messages: + msg4314
nosy: + ber
versions: + 1.4, - devel
2011-06-21 20:57:19cmeerwcreate