#29510: QueryDict.copy() returns closed files when the type of file is
TemporaryUploadedFile
-------------------------------------+-------------------------------------
Reporter: Liquid Scorpio | Owner: nobody
Type: Bug | Status: new
Component: File | Version: 1.11
uploads/storage |
Severity: Normal | Resolution:
Keywords: QueryDict, upload, | Triage Stage: Accepted
file |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):
* component: Uncategorized => File uploads/storage
* stage: Unreviewed => Accepted
Comment:
I can reproduce with Python 2, even if I'm unsure that the behavior is
incorrect:
{{{
>>> from django.core.files.uploadedfile import TemporaryUploadedFile
>>> from copy import deepcopy
>>> f = TemporaryUploadedFile('test.jpg', 'image/jpeg', 100, 'utf-8')
f.seekable()
True
a = deepcopy(f)
>>> a.seekable()
False
}}}
However, the `deepcopy()` crashes on Python 3 with:
`TypeError: cannot serialize '_io.BufferedRandom' object`
Accepting for further investigation.
--
Ticket URL: <https://code.djangoproject.com/ticket/29510#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/071.a169e894c1164485ab8c20ed0180656e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.