[issue27281] unpickling an xmlrpc.client.Fault raises TypeError

2016-06-09 Thread Uri Okrent
Uri Okrent added the comment: I updated the patch to improve the tests and made the same change to xmlrpc.client.ProtocolError (which was the only other place in xmlrpc.client). I'll let you decide if this patch is better despite the fact that it suffers from the same data duplicati

[issue27281] unpickling an xmlrpc.client.Fault raises TypeError

2016-06-09 Thread Uri Okrent
Uri Okrent added the comment: My reading of the docs leads me to lean towards bug since this seems to break the contract of BaseException API in a standard lib module: https://docs.python.org/3/library/exceptions.html#BaseException says BaseExceptions have args and with_traceback so those

[issue27281] unpickling an xmlrpc.client.Fault raises TypeError

2016-06-09 Thread Uri Okrent
Uri Okrent added the comment: I'm not pickling/unpickling it directly, I'm using multiprocessing to handle queries to my server in worker processes which is using pickle to propagate exceptions raised in the worker to the parent. I could instead raise a different exception and wr

[issue27281] unpickling an xmlrpc.client.Fault raises TypeError

2016-06-09 Thread Uri Okrent
New submission from Uri Okrent: Attempting to unpickle an xmlrpc.client.Fault will raise a TypeError: >>> import xmlrpc.client as xmlrpclib >>> f = xmlrpclib.Fault(42, 'Test Fault') >>> import pickle >>> s = pickle.dumps(f) >>> pickle.load