#26646: Add IOBase methods required by TextIOWrapper to FileProxyMixin.
-------------------------------------+-------------------------------------
Reporter: charettes | Owner: charettes
Type: New | Status: new
feature |
Component: File | Version: master
uploads/storage |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
It should be possible to use `File` objects returned by `FileField` in a
`io.TextIOWrapper`.
e.g.
{{{#!python
import csv
from io import TextIOWrapper
with TextIOWrapper(model_instance.csv_file, 'utf-8') as wrapper:
reader = csv.reader(wrapper)
...
}}}
This requires adding the missing `readable()`, `writable()` methods and
making the `seekable()` method of `FileProxyMixin()` available even on
Python 2 (#24963 added it for Python 3 only).
--
Ticket URL: <https://code.djangoproject.com/ticket/26646>
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/052.7a28539a49c62e9c597083b17fb4c1ed%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.