1. python_mirrors
  2. jython-fullhistory

Commits

Philip Jenvey  committed 8ce956e

remove bean accessors for sys.settrace/profile that we don't want
fixes #1456

  • Participants
  • Parent commits f96b363
  • Branches default

Comments (0)

Files changed (2)

File NEWS

View file
  • Ignore whitespace
     - [ 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

File src/org/python/core/PySystemState.java

View file
  • Ignore whitespace
  */
 // 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";
         __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());
     }