[issue17296] Cannot unpickle classes derived from 'Exception'

2020-03-06 Thread Brett Cannon


Brett Cannon  added the comment:

As this was fixed in 3.3 that means all actively maintained versions have the 
fix, and so closing as fixed.

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17296] Cannot unpickle classes derived from 'Exception'

2014-02-04 Thread Tal Einat

Changes by Tal Einat :


--
nosy:  -taleinat

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17296] Cannot unpickle classes derived from 'Exception'

2013-03-11 Thread Guido van Rossum

Changes by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17296] Cannot unpickle classes derived from 'Exception'

2013-03-11 Thread Aman Shah

Aman Shah added the comment:

I think it works with the other test also now. Have also included the failed 
test mentioned by Tres in the patch since it wasn't present in the python2.7 
test suite.

--
Added file: http://bugs.python.org/file29381/issue_17296v2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17296] Cannot unpickle classes derived from 'Exception'

2013-03-11 Thread Tres Seaver

Tres Seaver added the comment:

The latest 2.7 patch does not cause the following tests (from
issue 1692335) to pass:

 http://bugs.python.org/file17509/issue1692335-tests.patch

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17296] Cannot unpickle classes derived from 'Exception'

2013-03-11 Thread Aman Shah

Aman Shah added the comment:

Fixed the patch for 2.7

--
nosy: +Aman.Shah
Added file: http://bugs.python.org/file29373/issue_17296.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17296] Cannot unpickle classes derived from 'Exception'

2013-02-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2c9f7ed28384 by R David Murray in branch '3.2':
#17296: backport fix for issue 1692335, naive exception pickling.
http://hg.python.org/cpython/rev/2c9f7ed28384

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17296] Cannot unpickle classes derived from 'Exception'

2013-02-27 Thread R. David Murray

R. David Murray added the comment:

I don't have the expertise required to do the 2.7 backport.  My naive attempt 
is attached, but the message attribute is not preserved (test failure).  If 
someone can fix the patch, I'll commit it.

--
keywords: +patch
Added file: http://bugs.python.org/file29262/exception_pickling.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17296] Cannot unpickle classes derived from 'Exception'

2013-02-26 Thread Andreas Hausmann

Andreas Hausmann added the comment:

A backport to 2.7 would be in the interest of the Zope community (I dare say 
;)), at least in ours.

In our project, after having migrated to Zope 2.13/Python2.7 we found this bug 
and now we are quite worried what else might happen with our huge pickled 
database.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17296] Cannot unpickle classes derived from 'Exception'

2013-02-26 Thread Andreas Hausmann

Andreas Hausmann added the comment:

That is correct.

Under 2.4 and 3.3 it should show neither the line "EXCEPTION ## EXCEPTION" nor 
the following line "TypeError: ('__init__() takes at least 2 arguments."

That means, that in version 2.4 and 3.3 that unpickling problem doesn't exist. 
In version 2.4 I tested it myself; exactly, there is no problem. In version 3.3 
I simply take your word, that the bug is fixed.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17296] Cannot unpickle classes derived from 'Exception'

2013-02-25 Thread R. David Murray

R. David Murray added the comment:

I modified your script to run under both python2 and python3.  I get the error 
for 2.5, 2.6, and 2.7.  The script produces the same output (without the 
EXCEPTION ## EXCEPTION) under 2.4 and 3.3.

--
Added file: http://bugs.python.org/file29235/bug_cpickle.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17296] Cannot unpickle classes derived from 'Exception'

2013-02-25 Thread R. David Murray

R. David Murray added the comment:

The reason I ask is because that issue ends with "reopen if you think this 
should be backported", so a backport is at least within the real of possibility 
:)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17296] Cannot unpickle classes derived from 'Exception'

2013-02-25 Thread Andreas Hausmann

Andreas Hausmann added the comment:

I have not tried in 3.3. I have no running installation of 3.3.

I need a solution for 2.7 for a Zope project that was just ported to 2.7. My 
test for Python3 was halfheartedly on my standard Python3 installation (3.2) 
after reading Issue1692335.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17296] Cannot unpickle classes derived from 'Exception'

2013-02-25 Thread R. David Murray

R. David Murray added the comment:

That issue was only fixed in 3.3.  Does your code work in 3.3?

--
nosy: +r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17296] Cannot unpickle classes derived from 'Exception'

2013-02-25 Thread Andreas Hausmann

New submission from Andreas Hausmann:

When pickling/unpickling a class that derives from the builtin class Exception, 
unpickling results in a

TypeError: ('__init__() takes at least 2 arguments (1 given)', , ())

A standard exception like ValueError can be pickled/unpickled without any 
problem.

This was observed for versions 2.7.3 and 3.2.3. for both pickle and cPickle.

A script (cpickle) that shows that behavior is included.

This is related (but I do not quite understand how) to the closed Issue1692335.

--
components: Interpreter Core
files: bug_cpickle.py
messages: 182960
nosy: Andreas.Hausmann, alexandre.vassalotti, belopolsky, benjamin.peterson, 
bpb, brett.cannon, ehuss, facundobatista, fmitha, georg.brandl, gvanrossum, 
haypo, jafo, jarpa, jason.coombs, kylev, loewis, lukasz.langa, nnorwitz, 
pitrou, python-dev, sbt, taleinat, tseaver, zbysz, zseil
priority: normal
severity: normal
status: open
title: Cannot unpickle classes derived from 'Exception'
type: behavior
versions: Python 2.7, Python 3.2
Added file: http://bugs.python.org/file29234/bug_cpickle.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com