This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dmgrime
Recipients
Date 2003-08-01.14:27:16
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=699265

Skip --

I stand corrected (for cPickle, anyway) - but I imagine there is a 
performance degredation over the "old" way of doing things - if I get a 
chance, I'll test that.  

The problem does still exist at least in marshal (.load and .dump only 
accept a "real" file object).  I did a grep for PyFile_Check in the source tree 
prior to posting the bug report, and was a little over zealous to include 
cPickle in the subject.  There are other places in the source ( and possibly 
in 3rd party extensions) which use PyFile_Check, and I haven't had a 
change to analyze those yet.

In any case, marshal doesn't work - in your test, if you change the cPickle 
to marshal, you'll get:

Traceback (most recent call last):
  File "x.py", line 10, in ?
    marshal.dump("Hello, world", f)
TypeError: marshal.dump() 2nd arg must be file

Again, I'm not sure of the impact other places where PyFile_Check is 
used, and I don't know the performance loss in cPickle (as compared to 
the "real" file implementation in pre-2.3 socket.makefile())

Let me know if there is anything I can do to help debug/fix!

History
Date User Action Args
2007-08-23 14:15:31adminlinkissue780354 messages
2007-08-23 14:15:31admincreate