Issue1530257

classification
Title: Jython 2.2 cannot pickle types
Type: Severity: normal
Components: Core Versions:
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: abpillai, cgroves
Priority: normal Keywords:

Created on 2006-07-28.09:36:23 by abpillai, last changed 2006-09-07.04:28:37 by cgroves.

Messages
msg1182 (view) Author: Anand Pillai (abpillai) Date: 2006-07-28.09:36:23
There is a problem pickling types in Jython 2.2. 

anand@localhost:/opt/jython-2.2$ ./jython
Jython 2.2a1 on java1.5.0_06 (JIT: null)
Type "copyright", "credits" or "license" for more
information.
>>> import pickle
>>> pickle.dumps(int)
Traceback (innermost last):
  File "<console>", line 1, in ?
  File "/opt/jython-2.2/Lib/pickle.py", line 978, in dumps
  File "/opt/jython-2.2/Lib/pickle.py", line 115, in dump
  File "/opt/jython-2.2/Lib/pickle.py", line 185, in save
PicklingError: can't pickle 'type' object: <type 'int'>
>>> import cPickle
>>> cPickle.dumps(int)
Traceback (innermost last):
  File "<console>", line 1, in ?
UnpickleableError: Cannot pickle <type 'int'> objects

Type pickling used to work fine in Jython 2.1 .

Scenario:

We are using PyLinda in Jython environment for a
European project (EIAO). PyLinda requires support for
pickling types. However, since it also needs
generators, we have to use Jython 2.2. Due to the bug
above, we are using a patched pickle.py to work around it.

However the problem seems to be an issue with
type/class unification in Jython and needs to be fixed
in Jython core.
msg1183 (view) Author: Charlie Groves (cgroves) Date: 2006-09-07.04:28:37
Logged In: YES 
user_id=1174327

This is fixed in trunk
History
Date User Action Args
2006-07-28 09:36:23abpillaicreate