From: <pj...@us...> - 2010-04-11 22:21:43
|
Revision: 7020 http://jython.svn.sourceforge.net/jython/?rev=7020&view=rev Author: pjenvey Date: 2010-04-11 22:21:31 +0000 (Sun, 11 Apr 2010) Log Message: ----------- remove bean accessors for sys.settrace/profile that we don't want fixes #1456 Modified Paths: -------------- trunk/jython/NEWS trunk/jython/src/org/python/core/PySystemState.java Modified: trunk/jython/NEWS =================================================================== --- trunk/jython/NEWS 2010-04-11 19:49:26 UTC (rev 7019) +++ trunk/jython/NEWS 2010-04-11 22:21:31 UTC (rev 7020) @@ -30,6 +30,7 @@ - [ 1520 ] os.listdir doesn't return unicode when requested - [ 1483 ] optparse std module dies on non-ASCII unicode data - [ 1390 ] ihooks fails due to unimplemented methods in imp module + - [ 1456 ] sys.trace/profile attributes cause: AttributeError: write-only attr: trace in PyAMF - Fix runtime issues during exitfuncs triggered via SystemRestart (such as during Django or Pylons development mode reloading) - Fix pickling of collections.defaultdict objects Modified: trunk/jython/src/org/python/core/PySystemState.java =================================================================== --- trunk/jython/src/org/python/core/PySystemState.java 2010-04-11 19:49:26 UTC (rev 7019) +++ trunk/jython/src/org/python/core/PySystemState.java 2010-04-11 22:21:31 UTC (rev 7020) @@ -34,8 +34,7 @@ */ // xxx Many have lamented, this should really be a module! // but it will require some refactoring to see this wish come true. -public class PySystemState extends PyObject -{ +public class PySystemState extends PyObject implements ClassDictInit { public static final String PYTHON_CACHEDIR = "python.cachedir"; public static final String PYTHON_CACHEDIR_SKIP = "python.cachedir.skip"; public static final String PYTHON_CONSOLE_ENCODING = "python.console.encoding"; @@ -191,6 +190,12 @@ __dict__.__setitem__("excepthook", __excepthook__); } + public static void classDictInit(PyObject dict) { + // XXX: Remove bean accessors for settrace/profile that we don't want + dict.__setitem__("trace", null); + dict.__setitem__("profile", null); + } + void reload() throws PyIgnoreMethodTag { __dict__.invoke("update", getType().fastGetDict()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |