Opened 16 years ago

Closed 16 years ago

Last modified 13 years ago

#9344 closed (fixed)

TemporaryFile is missing the 'tell' method on Windows platforms

Reported by: Julien Phalip Owned by: Armin Ronacher
Component: File uploads/storage Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The tell() method is missing in the specific implementation of TemporaryFile for Windows platforms, which causes crashes when using PIL, for example. Simple fix attached.

Attachments (3)

9344.temporaryfile-tell.diff (572 bytes ) - added by Julien Phalip 16 years ago.
9344.temporaryfile-tell.2.diff (571 bytes ) - added by Julien Phalip 16 years ago.
9344-temporary-file-delegation.patch (817 bytes ) - added by Armin Ronacher 16 years ago.
delegates attribute lookups to the underlaying file.

Download all attachments as: .zip

Change History (10)

by Julien Phalip, 16 years ago

by Julien Phalip, 16 years ago

comment:1 by Julien Phalip, 16 years ago

FYI, #7769 was checked in right before 1.0 was released. That patch didn't contain tests so I thought this ticket would also be considered "trivial" enough. Should tests be written for this ticket? It would seem like overkill to me.

comment:2 by Jacob, 16 years ago

milestone: 1.1
Triage Stage: UnreviewedAccepted

comment:3 by Armin Ronacher, 16 years ago

Owner: changed from nobody to Armin Ronacher

by Armin Ronacher, 16 years ago

delegates attribute lookups to the underlaying file.

comment:4 by Armin Ronacher, 16 years ago

The patch above changes the class to forward the attribute lookups to the underlying file object so all calls should be supported now. This is actually how a lot of the file wrappers in python are implemented, so I suppose it should be fine.

comment:5 by Jacob, 16 years ago

Triage Stage: AcceptedReady for checkin

comment:6 by Gary Wilson, 16 years ago

Resolution: fixed
Status: newclosed

(In [10700]) [1.0.X]: Fixed #9344 -- In the TemporaryFile class used by Windows, proxy to the wrapped file object. Thanks julien and mitsuhiko.

Backport of r10699 from trunk.

comment:7 by Jacob, 13 years ago

milestone: 1.1

Milestone 1.1 deleted

Note: See TracTickets for help on using tickets.
Back to Top