[Patches] [ python-Patches-526072 ] pickling os.stat results round II

noreply@sourceforge.net noreply@sourceforge.net
Wed, 06 Mar 2002 03:13:35 -0800


Patches item #526072, was opened at 2002-03-05 19:00
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=526072&group_id=5470

Category: Core (C code)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Michael Hudson (mwh)
Assigned to: Martin v. Löwis (loewis)
Summary: pickling os.stat results round II

Initial Comment:
Following discussion in patch #462296, I've tried to
implement what Martin suggested, i.e.

1) structseq's contructors now take an additional,
optional second argument which should be a dictionary.
 If any of the "invisible" fields are not specified by
the sequence first argument, their values are looked
for in this dict (if not found, None is used).  Extra
keys are ignored.

2) structseq's __reduce__ methods return invisible
fields in a dict.

3) I also fix the bug I just submitted, namely #526039.

Martin, can you look the code over?  I'm not sure it's
maximally-sensibly written.

WRT the finding-the-type-object issue: how about making
os.stat_result.__name__ == "os.stat_result" rather than
"posix.stat_result".

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

>Comment By: Michael Hudson (mwh)
Date: 2002-03-06 11:13

Message:
Logged In: YES 
user_id=6656

Oops, how embarrassing.

I don't think I can blame sf for this one -- I think I just
forgot.

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

Comment By: Martin v. Löwis (loewis)
Date: 2002-03-06 11:04

Message:
Logged In: YES 
user_id=21627

There's no uploaded file!  You have to check the
checkbox labeled "Check to Upload & Attach File"
when you upload a file.

Please try again.

(This is a SourceForge annoyance that we can do
nothing about. :-( )

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

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