Commit fc0f7aa1 authored by Jason Madden's avatar Jason Madden

Add missing readable/writable methods to FileObjectPosix. Fixes at least...

Add missing readable/writable methods to FileObjectPosix. Fixes at least help() on a monkey-patched Python 3
parent 0569f4b6
......@@ -15,7 +15,8 @@ Unreleased
Reported in :issue:`623` by Jonathan Kamens.
- Various fixes on Windows. Reported in :issue:`625`, :issue:`627`,
and :issue:`628` by jacekt and Yuanteng (Jeff) Pei. Fixed in :pr:`624`.
- Add ``readable`` and ``writable`` methods to ``FileObjectPosix``;
this fixes e.g., help() on Python 3 when monkey-patched.
1.1b1 (Jul 17, 2015)
====================
......
......@@ -216,6 +216,12 @@ class FileObjectPosix(object):
def readlines(self, sizehint=0):
return self.io.readlines(sizehint)
def readable(self):
return self.io.readable()
def writable(self):
return self.io.writable()
def seek(self, *args, **kwargs):
return self.io.seek(*args, **kwargs)
......@@ -232,4 +238,6 @@ class FileObjectPosix(object):
return self.io
def __getattr__(self, name):
# XXX: Should this really be _fobj, or self.io?
# _fobj can easily be None but io never is
return getattr(self._fobj, name)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment