New submission from Hagen Fürstenau <[EMAIL PROTECTED]>:

After pickling a set of ints with Python 3.0 and pickle protocol 2:

[EMAIL PROTECTED] ~]$ python3.0
Python 3.0b3 (r30b3:65927, Aug 21 2008, 11:48:29)
[GCC 4.1.0 20060304 (Red Hat 4.1.0-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pickle
>>> f = open("test", "wb")
>>> pickle.dump({1,2,3}, f, 2)
>>> f.close()

I get the following error when trying to read this with Python 2.6:

[EMAIL PROTECTED] ~]$ python
Python 2.6b3 (r26b3:65922, Aug 21 2008, 11:42:25)
[GCC 4.1.0 20060304 (Red Hat 4.1.0-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pickle
>>> f = open("test", "rb")
>>> pickle.load(f)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/MC/hagenf/local/lib/python2.6/pickle.py", line 1370, in load
    return Unpickler(file).load()
  File "/home/MC/hagenf/local/lib/python2.6/pickle.py", line 858, in load
    dispatch[key](self)
  File "/home/MC/hagenf/local/lib/python2.6/pickle.py", line 1090, in
load_global
    klass = self.find_class(module, name)
  File "/home/MC/hagenf/local/lib/python2.6/pickle.py", line 1124, in
find_class
    __import__(module)
ImportError: No module named builtins

----------
components: Library (Lib)
messages: 71916
nosy: hagen
severity: normal
status: open
title: Python 2.6 can't read sets pickled with Python 3.0
versions: Python 2.6, Python 3.0

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3675>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to