david <db.pub.m...@gmail.com> added the comment:

I don't have 3.3 installed so I cannot test it, but here is a patch for 2.6. I 
am sure it breaks stuff - are there tests for the subprocess module that would 
cover the cases that pickle was used for? 


--- subprocess.py.orig  2011-03-02 00:47:59.000000000 +1100
+++ subprocess.py       2011-03-02 00:51:27.000000000 +1100
@@ -414,7 +414,7 @@
     import select
     import errno
     import fcntl
-    import pickle
+    import json
 
 __all__ = ["Popen", "PIPE", "STDOUT", "call", "check_call", 
"CalledProcessError"]
 
@@ -1105,7 +1105,7 @@
                                                                    exc_value,
                                                                    tb)
                             exc_value.child_traceback = ''.join(exc_lines)
-                            os.write(errpipe_write, pickle.dumps(exc_value))
+                            os.write(errpipe_write, json.dumps(exc_value))
 
                         # This exitcode won't be reported to applications, so 
it
                         # really doesn't matter what we return.
@@ -1134,7 +1134,7 @@
 
             if data != "":
                 _eintr_retry_call(os.waitpid, self.pid, 0)
-                child_exception = pickle.loads(data)
+                child_exception = json.loads(data)
                 for fd in (p2cwrite, c2pread, errread):
                     if fd is not None:
                         os.close(fd)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11359>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to