Issue1286120

classification
Title: Can't Pickle Subclasses of object
Type: Severity: normal
Components: None Versions:
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: fwierzbicki Nosy List: fwierzbicki, leouserz
Priority: immediate Keywords:

Created on 2005-09-09.15:10:17 by leouserz, last changed 2006-06-26.00:56:57 by fwierzbicki.

Messages
msg1034 (view) Author: Deleted User leouserz (leouserz) Date: 2005-09-09.15:10:17
Here is a jython session that illustrates this:
Jython 2.2a1 on java1.5.0_02 (JIT: null)
Type "copyright", "credits" or "license" for more
information.
>>> import pickle
>>> class a( object ):
...     pass
...
>>> x = a()
>>> pickle.dumps( x )
Traceback (innermost last):
  File "<console>", line 1, in ?
  File
"C:\WINDOWS\jythonRelease_2_2alpha1\Lib\pickle.py",
line 978, in dumps
  File
"C:\WINDOWS\jythonRelease_2_2alpha1\Lib\pickle.py",
line 115, in dump
  File
"C:\WINDOWS\jythonRelease_2_2alpha1\Lib\pickle.py",
line 185, in save
PicklingError: can't pickle 'a' object: <__main__.a
object 1>
>>> z = object()
>>> pickle.dumps( z )
Traceback (innermost last):
  File "<console>", line 1, in ?
  File
"C:\WINDOWS\jythonRelease_2_2alpha1\Lib\pickle.py",
line 978, in dumps
  File
"C:\WINDOWS\jythonRelease_2_2alpha1\Lib\pickle.py",
line 115, in dump
  File
"C:\WINDOWS\jythonRelease_2_2alpha1\Lib\pickle.py",
line 185, in save
PicklingError: can't pickle 'object' object: <object
object 2>
>>>

--------
leouserz
msg1035 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2006-06-26.00:56:57
Logged In: YES 
user_id=193969

This has been fixed (along with many other pickle problems).
History
Date User Action Args
2005-09-09 15:10:17leouserzcreate