#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)
Change History (10)
by , 17 years ago
| Attachment: | 9344.temporaryfile-tell.diff added |
|---|
by , 17 years ago
| Attachment: | 9344.temporaryfile-tell.2.diff added |
|---|
comment:1 by , 17 years ago
comment:2 by , 17 years ago
| milestone: | → 1.1 |
|---|---|
| Triage Stage: | Unreviewed → Accepted |
comment:3 by , 17 years ago
| Owner: | changed from to |
|---|
by , 17 years ago
| Attachment: | 9344-temporary-file-delegation.patch added |
|---|
delegates attribute lookups to the underlaying file.
comment:4 by , 17 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 , 17 years ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
comment:6 by , 17 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
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.