[Django] #36974: SimpleUploadedFile should support text mode

6 views
Skip to first unread message

Django

unread,
Mar 6, 2026, 8:19:17 AM (12 days ago) Mar 6
to django-...@googlegroups.com
#36974: SimpleUploadedFile should support text mode
-------------------------------------+-------------------------------------
Reporter: Denis Washington | Type:
| Uncategorized
Status: new | Component: File
| uploads/storage
Version: 6.0 | Severity: Normal
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Currently, `SimpleUploadedFile` requires a bytes-like object to be passed
as `content`, and `open()` always returns a `BytesIO`. This makes it
useless in contexts where text-mode file-like object is expected. (I hit
this issue when trying to pass `file.open()` to `pandas.read_csv()`, for
instance.)

It would be great if `SimpleUploadedFile` would alternatively accept a
`str`, in which case `open()` would then return a `StringIO` instead.
--
Ticket URL: <https://code.djangoproject.com/ticket/36974>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Mar 6, 2026, 9:26:14 PM (12 days ago) Mar 6
to django-...@googlegroups.com
#36974: SimpleUploadedFile should support text mode
-------------------------------------+-------------------------------------
Reporter: Denis Washington | Owner: Dinesh
| Thumma
Type: Uncategorized | Status: assigned
Component: File | Version: 6.0
uploads/storage |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Dinesh Thumma):

* owner: (none) => Dinesh Thumma
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/36974#comment:1>

Django

unread,
Mar 9, 2026, 3:47:36 PM (9 days ago) Mar 9
to django-...@googlegroups.com
#36974: SimpleUploadedFile should support text mode
-------------------------------------+-------------------------------------
Reporter: Denis Washington | Owner: Dinesh
| Thumma
Type: New feature | Status: assigned
Component: File | Version: 6.0
uploads/storage |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Elias Stinson):

* stage: Unreviewed => Accepted
* type: Uncategorized => New feature

Comment:

I'm not 100% sure what involvement would be required to move this forward,
but I do think it's a valid and valuable addition to the overall codebase
and support. I'll mark the triage status as approved because this seems
like a clear addition.
--
Ticket URL: <https://code.djangoproject.com/ticket/36974#comment:2>

Django

unread,
Mar 9, 2026, 5:29:59 PM (9 days ago) Mar 9
to django-...@googlegroups.com
#36974: SimpleUploadedFile should support text mode
-------------------------------------+-------------------------------------
Reporter: Denis Washington | Owner: Dinesh
| Thumma
Type: Uncategorized | Status: assigned
Component: File | Version: 6.0
uploads/storage |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* stage: Accepted => Unreviewed
* type: New feature => Uncategorized

Comment:

Elias, the next steps box earlier on this page advises to give a second
opinion when accepting if the subject is debatable in any form. The second
opinion you've given is vague: "valid, valuable, clear addition". That's
not helpful.

You should stop contributing low-quality triage.
--
Ticket URL: <https://code.djangoproject.com/ticket/36974#comment:3>

Django

unread,
1:45 PM (6 hours ago) 1:45 PM
to django-...@googlegroups.com
#36974: SimpleUploadedFile should support text mode
-------------------------------------+-------------------------------------
Reporter: Denis Washington | Owner: Dinesh
| Thumma
Type: New feature | Status: closed
Component: File | Version: 6.0
uploads/storage | Resolution:
Severity: Normal | needsnewfeatureprocess
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* resolution: => needsnewfeatureprocess
* status: assigned => closed
* type: Uncategorized => New feature

Comment:

Thanks for the idea. When suggesting a new feature for Django, the feature
idea should first be proposed and discussed with the community. To do
that, please raise this on the [https://github.com/django/new-
features/issues ​new feature tracker].

I'll close the ticket for now, but if the community agrees with the
proposal, please return to this ticket and reference the forum discussion
so we can re-open it. For more information, please refer to
[https://docs.djangoproject.com/en/stable/internals/contributing/bugs-and-
features/#requesting-features the documented guidelines for requesting
features].
--
Ticket URL: <https://code.djangoproject.com/ticket/36974#comment:4>
Reply all
Reply to author
Forward
0 new messages