Open GoogleCodeExporter opened 9 years ago
Oops. fs version 0.5.0
Original comment by shewitt...@gmail.com
on 16 Oct 2014 at 7:11
Confirmed. Looks like a bug in readline.
Original comment by willmcgugan
on 16 Oct 2014 at 1:20
Pushed some changes to SVN. Please let me know if it fixes the problem.
Original comment by willmcgugan
on 16 Oct 2014 at 2:16
No, the problem still seems to exist.
Seems to be in 'filelike.py' line 660:
def _read(self,sizehint=-1):
data = self.wrapped_file.read(sizehint)
if data == b(""): #660
return None
return data
>>> print(repr(data))
''
>>> print(type(data))
<class 'str'>
>>> print(repr(b("")))
b''
>>> print(type(b("")))
<class 'bytes'>
Original comment by shewitt...@gmail.com
on 16 Oct 2014 at 5:43
Actually that doesn't fix it, although it is a bug. Another pops up. It seems
there are a few problems here.
Original comment by shewitt...@gmail.com
on 17 Oct 2014 at 3:23
It was the fsopen method that was at fault. There was a little bit of magic
applied to the retuned file object to close the fs when the file was closed.
Unfortunately that broke Py3 because it wasn't aware of unicode streams.
Anyway, I have used a different approach that works with Py2 & 3. Give that a
try please.
Original comment by willmcgugan
on 18 Oct 2014 at 11:07
That seems to have done the trick. Thanks.
Original comment by shewitt...@gmail.com
on 18 Oct 2014 at 11:32
Original issue reported on code.google.com by
shewitt...@gmail.com
on 16 Oct 2014 at 7:09