Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[ python-Bugs-1675967 ] Python2.5 can't read a (complex) pickle build by python2.4

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


noreply at sourceforge

Mar 7, 2007, 10:16 AM

Post #1 of 6 (264 views)
Permalink
[ python-Bugs-1675967 ] Python2.5 can't read a (complex) pickle build by python2.4

Bugs item #1675967, was opened at 2007-03-07 18:16
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1675967&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Michael Vogt (mvo)
Assigned to: Nobody/Anonymous (nobody)
Summary: Python2.5 can't read a (complex) pickle build by python2.4

Initial Comment:
Part of gnome-app-install in ubuntu is a pickle data structure cache. If I create this pickle with python 2.4 and read it later with 2.5. I get the following error:

$ python2.5 -c 'import pickle; pickle.load(open("/var/cache/app-install/menu.p"))'
/usr/lib/python2.5/pickle.py:1124: DeprecationWarning: The sre module is deprecated, please import re.
__import__(module)
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python2.5/pickle.py", line 1370, in load
return Unpickler(file).load()
File "/usr/lib/python2.5/pickle.py", line 858, in load
dispatch[key](self)
File "/usr/lib/python2.5/pickle.py", line 1090, in load_global
klass = self.find_class(module, name)
File "/usr/lib/python2.5/pickle.py", line 1126, in find_class
klass = getattr(mod, name)
AttributeError: 'module' object has no attribute '_compile'

With:
$ python2.4 -c 'import pickle; pickle.load(open("/var/cache/app-install/menu.p"))'
egon[at]top ~ $

It loads just fine.

The test pickle can be found here:
http://people.ubuntu.com/~mvo/gnome-app-install/menu.p.gz

Cheers,
Michael

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1675967&group_id=5470
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


noreply at sourceforge

Mar 7, 2007, 11:43 AM

Post #2 of 6 (249 views)
Permalink
[ python-Bugs-1675967 ] Python2.5 can't read a (complex) pickle build by python2.4 [In reply to]

Bugs item #1675967, was opened at 2007-03-07 19:16
Message generated for change (Comment added) made by zseil
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1675967&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Michael Vogt (mvo)
Assigned to: Nobody/Anonymous (nobody)
Summary: Python2.5 can't read a (complex) pickle build by python2.4

Initial Comment:
Part of gnome-app-install in ubuntu is a pickle data structure cache. If I create this pickle with python 2.4 and read it later with 2.5. I get the following error:

$ python2.5 -c 'import pickle; pickle.load(open("/var/cache/app-install/menu.p"))'
/usr/lib/python2.5/pickle.py:1124: DeprecationWarning: The sre module is deprecated, please import re.
__import__(module)
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python2.5/pickle.py", line 1370, in load
return Unpickler(file).load()
File "/usr/lib/python2.5/pickle.py", line 858, in load
dispatch[key](self)
File "/usr/lib/python2.5/pickle.py", line 1090, in load_global
klass = self.find_class(module, name)
File "/usr/lib/python2.5/pickle.py", line 1126, in find_class
klass = getattr(mod, name)
AttributeError: 'module' object has no attribute '_compile'

With:
$ python2.4 -c 'import pickle; pickle.load(open("/var/cache/app-install/menu.p"))'
egon[at]top ~ $

It loads just fine.

The test pickle can be found here:
http://people.ubuntu.com/~mvo/gnome-app-install/menu.p.gz

Cheers,
Michael

----------------------------------------------------------------------

Comment By: Žiga Seilnacht (zseil)
Date: 2007-03-07 20:43

Message:
Logged In: YES
user_id=1326842
Originator: NO

This happens because of SRE_Pattern objects in jour pickle.
The sre module was renamed to re in Python 2.5, but the
old pickles still expect the _compile function in sre module.
I posted the patch here:

http://freeweb.siol.net/chollus/

Could you try if it fixes the problem for you and in that
case, attach it to this report?

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1675967&group_id=5470
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


noreply at sourceforge

Mar 11, 2007, 8:40 AM

Post #3 of 6 (252 views)
Permalink
[ python-Bugs-1675967 ] Python2.5 can't read a (complex) pickle build by python2.4 [In reply to]

Bugs item #1675967, was opened at 2007-03-07 19:16
Message generated for change (Comment added) made by zseil
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1675967&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Michael Vogt (mvo)
Assigned to: Nobody/Anonymous (nobody)
Summary: Python2.5 can't read a (complex) pickle build by python2.4

Initial Comment:
Part of gnome-app-install in ubuntu is a pickle data structure cache. If I create this pickle with python 2.4 and read it later with 2.5. I get the following error:

$ python2.5 -c 'import pickle; pickle.load(open("/var/cache/app-install/menu.p"))'
/usr/lib/python2.5/pickle.py:1124: DeprecationWarning: The sre module is deprecated, please import re.
__import__(module)
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python2.5/pickle.py", line 1370, in load
return Unpickler(file).load()
File "/usr/lib/python2.5/pickle.py", line 858, in load
dispatch[key](self)
File "/usr/lib/python2.5/pickle.py", line 1090, in load_global
klass = self.find_class(module, name)
File "/usr/lib/python2.5/pickle.py", line 1126, in find_class
klass = getattr(mod, name)
AttributeError: 'module' object has no attribute '_compile'

With:
$ python2.4 -c 'import pickle; pickle.load(open("/var/cache/app-install/menu.p"))'
egon[at]top ~ $

It loads just fine.

The test pickle can be found here:
http://people.ubuntu.com/~mvo/gnome-app-install/menu.p.gz

Cheers,
Michael

----------------------------------------------------------------------

>Comment By: Žiga Seilnacht (zseil)
Date: 2007-03-11 16:40

Message:
Logged In: YES
user_id=1326842
Originator: NO

Attaching the patch with a test here. Unpickling
old patterns with this patch works, but it still
issues a DeprecationWarning. The test itself is
a bit obscure, but the other option is to add
a binary file to the test suite.
File Added: sre_pickle_compatibility.diff

----------------------------------------------------------------------

Comment By: Žiga Seilnacht (zseil)
Date: 2007-03-07 20:43

Message:
Logged In: YES
user_id=1326842
Originator: NO

This happens because of SRE_Pattern objects in jour pickle.
The sre module was renamed to re in Python 2.5, but the
old pickles still expect the _compile function in sre module.
I posted the patch here:

http://freeweb.siol.net/chollus/

Could you try if it fixes the problem for you and in that
case, attach it to this report?

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1675967&group_id=5470
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


noreply at sourceforge

Mar 19, 2007, 10:16 AM

Post #4 of 6 (242 views)
Permalink
[ python-Bugs-1675967 ] Python2.5 can't read a (complex) pickle build by python2.4 [In reply to]

Bugs item #1675967, was opened at 2007-03-07 13:16
Message generated for change (Settings changed) made by collinwinter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1675967&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Michael Vogt (mvo)
>Assigned to: Žiga Seilnacht (zseil)
Summary: Python2.5 can't read a (complex) pickle build by python2.4

Initial Comment:
Part of gnome-app-install in ubuntu is a pickle data structure cache. If I create this pickle with python 2.4 and read it later with 2.5. I get the following error:

$ python2.5 -c 'import pickle; pickle.load(open("/var/cache/app-install/menu.p"))'
/usr/lib/python2.5/pickle.py:1124: DeprecationWarning: The sre module is deprecated, please import re.
__import__(module)
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python2.5/pickle.py", line 1370, in load
return Unpickler(file).load()
File "/usr/lib/python2.5/pickle.py", line 858, in load
dispatch[key](self)
File "/usr/lib/python2.5/pickle.py", line 1090, in load_global
klass = self.find_class(module, name)
File "/usr/lib/python2.5/pickle.py", line 1126, in find_class
klass = getattr(mod, name)
AttributeError: 'module' object has no attribute '_compile'

With:
$ python2.4 -c 'import pickle; pickle.load(open("/var/cache/app-install/menu.p"))'
egon[at]top ~ $

It loads just fine.

The test pickle can be found here:
http://people.ubuntu.com/~mvo/gnome-app-install/menu.p.gz

Cheers,
Michael

----------------------------------------------------------------------

Comment By: Žiga Seilnacht (zseil)
Date: 2007-03-11 11:40

Message:
Logged In: YES
user_id=1326842
Originator: NO

Attaching the patch with a test here. Unpickling
old patterns with this patch works, but it still
issues a DeprecationWarning. The test itself is
a bit obscure, but the other option is to add
a binary file to the test suite.
File Added: sre_pickle_compatibility.diff

----------------------------------------------------------------------

Comment By: Žiga Seilnacht (zseil)
Date: 2007-03-07 14:43

Message:
Logged In: YES
user_id=1326842
Originator: NO

This happens because of SRE_Pattern objects in jour pickle.
The sre module was renamed to re in Python 2.5, but the
old pickles still expect the _compile function in sre module.
I posted the patch here:

http://freeweb.siol.net/chollus/

Could you try if it fixes the problem for you and in that
case, attach it to this report?

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1675967&group_id=5470
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


noreply at sourceforge

Mar 21, 2007, 2:43 AM

Post #5 of 6 (231 views)
Permalink
[ python-Bugs-1675967 ] Python2.5 can't read a (complex) pickle build by python2.4 [In reply to]

Bugs item #1675967, was opened at 2007-03-07 18:16
Message generated for change (Comment added) made by mvo
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1675967&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Michael Vogt (mvo)
Assigned to: Žiga Seilnacht (zseil)
Summary: Python2.5 can't read a (complex) pickle build by python2.4

Initial Comment:
Part of gnome-app-install in ubuntu is a pickle data structure cache. If I create this pickle with python 2.4 and read it later with 2.5. I get the following error:

$ python2.5 -c 'import pickle; pickle.load(open("/var/cache/app-install/menu.p"))'
/usr/lib/python2.5/pickle.py:1124: DeprecationWarning: The sre module is deprecated, please import re.
__import__(module)
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python2.5/pickle.py", line 1370, in load
return Unpickler(file).load()
File "/usr/lib/python2.5/pickle.py", line 858, in load
dispatch[key](self)
File "/usr/lib/python2.5/pickle.py", line 1090, in load_global
klass = self.find_class(module, name)
File "/usr/lib/python2.5/pickle.py", line 1126, in find_class
klass = getattr(mod, name)
AttributeError: 'module' object has no attribute '_compile'

With:
$ python2.4 -c 'import pickle; pickle.load(open("/var/cache/app-install/menu.p"))'
egon[at]top ~ $

It loads just fine.

The test pickle can be found here:
http://people.ubuntu.com/~mvo/gnome-app-install/menu.p.gz

Cheers,
Michael

----------------------------------------------------------------------

>Comment By: Michael Vogt (mvo)
Date: 2007-03-21 09:43

Message:
Logged In: YES
user_id=3206
Originator: YES

Thanks a lot for the patch. It works fine here with the patch.

----------------------------------------------------------------------

Comment By: Žiga Seilnacht (zseil)
Date: 2007-03-11 15:40

Message:
Logged In: YES
user_id=1326842
Originator: NO

Attaching the patch with a test here. Unpickling
old patterns with this patch works, but it still
issues a DeprecationWarning. The test itself is
a bit obscure, but the other option is to add
a binary file to the test suite.
File Added: sre_pickle_compatibility.diff

----------------------------------------------------------------------

Comment By: Žiga Seilnacht (zseil)
Date: 2007-03-07 19:43

Message:
Logged In: YES
user_id=1326842
Originator: NO

This happens because of SRE_Pattern objects in jour pickle.
The sre module was renamed to re in Python 2.5, but the
old pickles still expect the _compile function in sre module.
I posted the patch here:

http://freeweb.siol.net/chollus/

Could you try if it fixes the problem for you and in that
case, attach it to this report?

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1675967&group_id=5470
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


noreply at sourceforge

Mar 21, 2007, 1:41 PM

Post #6 of 6 (223 views)
Permalink
[ python-Bugs-1675967 ] Python2.5 can't read a (complex) pickle build by python2.4 [In reply to]

Bugs item #1675967, was opened at 2007-03-07 19:16
Message generated for change (Comment added) made by zseil
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1675967&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.5
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Michael Vogt (mvo)
Assigned to: Žiga Seilnacht (zseil)
Summary: Python2.5 can't read a (complex) pickle build by python2.4

Initial Comment:
Part of gnome-app-install in ubuntu is a pickle data structure cache. If I create this pickle with python 2.4 and read it later with 2.5. I get the following error:

$ python2.5 -c 'import pickle; pickle.load(open("/var/cache/app-install/menu.p"))'
/usr/lib/python2.5/pickle.py:1124: DeprecationWarning: The sre module is deprecated, please import re.
__import__(module)
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python2.5/pickle.py", line 1370, in load
return Unpickler(file).load()
File "/usr/lib/python2.5/pickle.py", line 858, in load
dispatch[key](self)
File "/usr/lib/python2.5/pickle.py", line 1090, in load_global
klass = self.find_class(module, name)
File "/usr/lib/python2.5/pickle.py", line 1126, in find_class
klass = getattr(mod, name)
AttributeError: 'module' object has no attribute '_compile'

With:
$ python2.4 -c 'import pickle; pickle.load(open("/var/cache/app-install/menu.p"))'
egon[at]top ~ $

It loads just fine.

The test pickle can be found here:
http://people.ubuntu.com/~mvo/gnome-app-install/menu.p.gz

Cheers,
Michael

----------------------------------------------------------------------

>Comment By: Žiga Seilnacht (zseil)
Date: 2007-03-21 21:41

Message:
Logged In: YES
user_id=1326842
Originator: NO

The patch was commited as revision 54492, 54497 (2.5).

----------------------------------------------------------------------

Comment By: Michael Vogt (mvo)
Date: 2007-03-21 10:43

Message:
Logged In: YES
user_id=3206
Originator: YES

Thanks a lot for the patch. It works fine here with the patch.

----------------------------------------------------------------------

Comment By: Žiga Seilnacht (zseil)
Date: 2007-03-11 16:40

Message:
Logged In: YES
user_id=1326842
Originator: NO

Attaching the patch with a test here. Unpickling
old patterns with this patch works, but it still
issues a DeprecationWarning. The test itself is
a bit obscure, but the other option is to add
a binary file to the test suite.
File Added: sre_pickle_compatibility.diff

----------------------------------------------------------------------

Comment By: Žiga Seilnacht (zseil)
Date: 2007-03-07 20:43

Message:
Logged In: YES
user_id=1326842
Originator: NO

This happens because of SRE_Pattern objects in jour pickle.
The sre module was renamed to re in Python 2.5, but the
old pickles still expect the _compile function in sre module.
I posted the patch here:

http://freeweb.siol.net/chollus/

Could you try if it fixes the problem for you and in that
case, attach it to this report?

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1675967&group_id=5470
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.