[Patches] [ python-Patches-636769 ] Fix for major rexec bugs
noreply@sourceforge.net
noreply@sourceforge.net
Mon, 16 Dec 2002 05:13:57 -0800
Patches item #636769, was opened at 2002-11-11 21:51
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=636769&group_id=5470
Category: Library (Lib)
Group: None
>Status: Closed
Resolution: Accepted
Priority: 8
Submitted By: Gustavo Niemeyer (niemeyer)
Assigned to: Gustavo Niemeyer (niemeyer)
Summary: Fix for major rexec bugs
Initial Comment:
This patch fixes many flavours of the same major problem:
class S(str):
def __eq__(self, obj):
return 1
>>> file("/tmp/foo", S("w"))
<open file '/tmp/foo', mode 'w' at 0x101fdd88>
>>> __import__(S("dl"))
<module 'dl' from '/usr/lib/python2.2/lib-dynload/dl.so'>
>>> import os
>>> os.__name__ = S("dl")
>>> reload(os)
<module 'dl' from '/usr/lib/python2.2/lib-dynload/dl.so'>
Additionally, it removes the self.f reference of
"FileWrapper", includes 'xreadlines' and '__iter__' in
FileBase.ok_file_methods, and includes 'xreadlines' and
'_weakref' in RExec.ok_builtin_modules.
----------------------------------------------------------------------
>Comment By: Gustavo Niemeyer (niemeyer)
Date: 2002-12-16 13:13
Message:
Logged In: YES
user_id=7887
Applied as
Lib/rexec.py: 1.46
Lib/ihooks.py: 1.15
Misc/NEWS: 1.560
Thanks for reviewing Martin!
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2002-11-14 07:57
Message:
Logged In: YES
user_id=21627
The patch looks fine, please apply it.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=636769&group_id=5470