mirror of
https://github.com/django/django.git
synced 2025-07-24 13:44:32 +00:00
Fixed #26646 -- Added IOBase methods required by TextIOWrapper to File.
Thanks Tim for the review.
This commit is contained in:
parent
6ab0d1358f
commit
4f474607de
7 changed files with 69 additions and 33 deletions
|
@ -92,8 +92,13 @@ The ``File`` class
|
|||
the following attributes and methods of its ``file`` object:
|
||||
``encoding``, ``fileno``, ``flush``, ``isatty``, ``newlines``,
|
||||
``read``, ``readinto``, ``readlines``, ``seek``, ``softspace``, ``tell``,
|
||||
``truncate``, ``writelines``, ``xreadlines``. If you are using
|
||||
Python 3, the ``seekable`` method is also available.
|
||||
``truncate``, ``writelines``, ``xreadlines``, ``readable()``,
|
||||
``writable()``, and ``seekable()``.
|
||||
|
||||
.. versionchanged:: 1.11
|
||||
|
||||
The ``readable()`` and ``writable()`` methods were added and the
|
||||
``seekable()`` method was made available on Python 2.
|
||||
|
||||
.. currentmodule:: django.core.files.base
|
||||
|
||||
|
|
|
@ -122,7 +122,9 @@ Email
|
|||
File Storage
|
||||
~~~~~~~~~~~~
|
||||
|
||||
* ...
|
||||
* To make it wrappable by :class:`io.TextIOWrapper`,
|
||||
:class:`~django.core.files.File` now has the ``readable()``, ``writable()``,
|
||||
and ``seekable()`` methods.
|
||||
|
||||
File Uploads
|
||||
~~~~~~~~~~~~
|
||||
|
|
|
@ -972,6 +972,7 @@ wordcount
|
|||
wordwrap
|
||||
workflow
|
||||
worksforme
|
||||
wrappable
|
||||
wsgi
|
||||
www
|
||||
xe
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue