[Python-bugs-list] [ python-Bugs-496873 ] cPickle / time.struct_time loop

noreply@sourceforge.net noreply@sourceforge.net
Wed, 26 Dec 2001 22:06:25 -0800


Bugs item #496873, was opened at 2001-12-26 13:18
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=496873&group_id=5470

>Category: Type/class unification
Group: Python 2.2
Status: Open
Resolution: None
>Priority: 7
Submitted By: Vicente Rey Bakaikoa (bixentxo)
>Assigned to: Guido van Rossum (gvanrossum)
Summary: cPickle / time.struct_time loop

Initial Comment:
The following code produces and endless loop
on python 2.2 ( ok on python 2.1 ). The
file being saved by cPickle.dump grows
indefinetely.

-----------------------------
import time, cPickle

created = time.localtime()

fd = open('/tmp/bla.pickle','w')
cPickle.dump(created,fd)
[...endless loop... ]

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

>Comment By: Tim Peters (tim_one)
Date: 2001-12-26 22:06

Message:
Logged In: YES 
user_id=31435

Boosted priority, assigned to Guido.

A stack fault is faster to produce via the one-liner

cPickle.dumps(time.localtime())

There's unbounded recursion.

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

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=496873&group_id=5470