Opened 16 years ago

Closed 16 years ago

#8383 closed (duplicate)

TemporaryUploadedFile.seek function signature doesn't match what's expected

Reported by: vomjom Owned by: nobody
Component: File uploads/storage Version: dev
Severity: Keywords:
Cc: vomjom@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In django/core/files/uploadedfile.py, TemporaryUploadedFile's seek function only takes an offset, but as in shown in http://docs.python.org/lib/bltin-file-objects.html it should also takes a whence argument.

It'd be far better if TemporaryUploadedFile's file-object functions were more similar to InMemoryUploadedFile in that they would pass all the arguments, like:

def seek(self, *args, **kwargs):
    return self._file.seek(*args, **kwargs)

And so on for the rest of the functions.

Change History (1)

comment:1 by vomjom, 16 years ago

Resolution: duplicate
Status: newclosed

Oops, this looks like a dupe of #7769

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