[issue892902] problem with pickling newstyle class instances

2015-11-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9ad1fd251ddf by Serhiy Storchaka in branch '2.7':
Issue #892902: Fixed pickling recursive objects.
https://hg.python.org/cpython/rev/9ad1fd251ddf

New changeset 2071d16ed5e6 by Serhiy Storchaka in branch '3.4':
Issue #892902: Added new tests for pickling recursive collections.
https://hg.python.org/cpython/rev/2071d16ed5e6

New changeset f33ce913220b by Serhiy Storchaka in branch '3.5':
Issue #892902: Added new tests for pickling recursive collections.
https://hg.python.org/cpython/rev/f33ce913220b

New changeset 2c81a883d8ca by Serhiy Storchaka in branch 'default':
Issue #892902: Added new tests for pickling recursive collections.
https://hg.python.org/cpython/rev/2c81a883d8ca

--
nosy: +python-dev

___
Python tracker 

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



[issue892902] problem with pickling newstyle class instances

2015-11-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your review Alexandre.

In 3.x old tests test_recursive_set and test_recursive_frozenset now are 
implemented in test_recursive_set_and_inst and 
test_recursive_frozenset_and_inst. Instead new test_recursive_set now tests 
protocol 4 ability of pickling recursive sets itself.

--
resolution:  -> fixed
stage: patch review -> 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



[issue892902] problem with pickling newstyle class instances

2015-11-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 77184a429dae by Serhiy Storchaka in branch '2.7':
Issue #892902: Disable newly added tests in test_xpickle.
https://hg.python.org/cpython/rev/77184a429dae

--

___
Python tracker 

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



[issue892902] problem with pickling newstyle class instances

2015-11-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is revised patch that uses different approach to tests. 
cPickleFastPicklerTests overridden old recursive tests to check that they 
raises an exception. The patch extends this to new recursive tests.

--
Added file: http://bugs.python.org/file40961/pickle_recursive-2.7_3.patch

___
Python tracker 

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



[issue892902] problem with pickling newstyle class instances

2015-11-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Updated patch addresses Alexandre's comments.

--
Added file: http://bugs.python.org/file40947/pickle_recursive-2.7_2.patch

___
Python tracker 

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



[issue892902] problem with pickling newstyle class instances

2015-11-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Could you please make a review Alexandre?

--

___
Python tracker 

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



[issue892902] problem with pickling newstyle class instances

2015-10-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch that backports recursive objects handling to 2.7.

--
keywords: +patch
nosy: +serhiy.storchaka
stage: needs patch -> patch review
Added file: http://bugs.python.org/file40859/pickle_recursive-2.7.patch

___
Python tracker 

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



[issue892902] problem with pickling newstyle class instances

2015-10-25 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
stage: test needed -> needs patch
versions:  -Python 3.1, Python 3.2

___
Python tracker 

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



[issue892902] problem with pickling newstyle class instances

2014-02-03 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
nosy:  -BreamoreBoy

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



[issue892902] problem with pickling newstyle class instances

2013-05-02 Thread Alexandre Vassalotti

Alexandre Vassalotti added the comment:

I fixed this while working on PEP 3154 
[http://hg.python.org/features/pep-3154-alexandre/rev/eed9142d664f]. The 
relevant piece is

@@ -420,7 +424,13 @@ class _Pickler:
 write(REDUCE)
 
 if obj is not None:
-self.memoize(obj)
+# If the object is already in the memo, this means it is
+# recursive. In this case, throw away everything we put on the
+# stack, and fetch the object back from the memo.
+if id(obj) in self.memo:
+write(POP + self.get(self.memo[id(obj)][0]))
+else:
+self.memoize(obj)
 
 # More new special cases (that work with older protocols as
 # well): when __reduce__ returns a tuple with 4 or 5 items,

It would be pretty easy to backport this to 2.7 and 3.3. It is also good to 
mention that that only protocol 0 and 1 are affected.

--

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



[issue892902] problem with pickling newstyle class instances

2010-08-18 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

This is still a problem with 2.6 and 2.7.  I don't know how to test this with 
py3k as cPickle doesn't exist, can someone advise, thanks.

--
nosy: +BreamoreBoy

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



[issue892902] problem with pickling newstyle class instances

2010-08-18 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6

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



[issue892902] problem with pickling newstyle class instances

2009-02-14 Thread Daniel Diniz

Daniel Diniz aja...@gmail.com added the comment:

Confirmed on trunk.

--
nosy: +ajaksu2
stage:  - test needed
versions: +Python 2.6 -Python 2.3

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



[issue892902] problem with pickling newstyle class instances

2007-12-01 Thread Alexandre Vassalotti

Alexandre Vassalotti added the comment:

Please assign this bug to me.

Note that neither cPickle or pickle is able to load the stream generated
by cPickle correctly:

g = group(None)
subitem(g)
g[0].parent is g
   True
gp = cPickle.loads(cPickle.dumps(g))
gp[0].parent is gp
   False

I don't think that will be easy to fix, but I will try to see what I can do.

--
components: +Library (Lib) -Interpreter Core
nosy: +alexandre.vassalotti
type:  - behavior


Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue892902

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



[issue892902] problem with pickling newstyle class instances

2007-12-01 Thread Alexandre Vassalotti

Changes by Alexandre Vassalotti:


--
assignee:  - alexandre.vassalotti


Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue892902

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