Opened 8 years ago

Closed 7 years ago

Last modified 5 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: UI/UX:

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 8 years ago.
9344.temporaryfile-tell.2.diff (571 bytes) - added by Julien Phalip 8 years ago.
9344-temporary-file-delegation.patch (817 bytes) - added by Armin Ronacher 7 years ago.
delegates attribute lookups to the underlaying file.

Download all attachments as: .zip

Change History (10)

Changed 8 years ago by Julien Phalip

Changed 8 years ago by Julien Phalip

comment:1 Changed 8 years ago by Julien Phalip

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

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 Changed 8 years ago by Jacob

milestone: 1.1
Triage Stage: UnreviewedAccepted

comment:3 Changed 7 years ago by Armin Ronacher

Owner: changed from nobody to Armin Ronacher

Changed 7 years ago by Armin Ronacher

delegates attribute lookups to the underlaying file.

comment:4 Changed 7 years ago by Armin Ronacher

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 Changed 7 years ago by Jacob

Triage Stage: AcceptedReady for checkin

comment:6 Changed 7 years ago by Gary Wilson

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 Changed 5 years ago by Jacob

milestone: 1.1

Milestone 1.1 deleted

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