#24963: Missing `seekable()` method in Files
------------------------------+--------------------
     Reporter:  carsongee     |      Owner:  nobody
         Type:  Bug           |     Status:  new
    Component:  Core (Other)  |    Version:  master
     Severity:  Normal        |   Keywords:
 Triage Stage:  Unreviewed    |  Has patch:  0
Easy pickings:  0             |      UI/UX:  0
------------------------------+--------------------
 Neither in django/core/files/utils.py or django/core/files/base.py::File
 is the seekable method implemented.  In python 3 this results in issues
 when attempting to use python standard interfaces such as `bz2` or
 `tarfile` and results in `AttributeError: 'File' object has no attribute
 'seekable'` errors when using File class objects.

 I'm not sure the best way to patch this though.  The seekable property
 isn't available in python2, but I think it can be duplicated in 2, by
 checking if it has `seek`, `tell`, and `truncate` based on
 https://docs.python.org/3/library/io.html#io.IOBase.seekable.  I'm happy
 to write the patch, but it would be worth knowing the preference for how
 to fix it.

--
Ticket URL: <https://code.djangoproject.com/ticket/24963>
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.9c77697c4868cfa053839f2d37456542%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to