A bigger problem here is that this line does not work as intended in Python 3:
```py
>>> from io import StringIO
>>> s = StringIO()
>>> hasattr(s, 'fileno')
True
>>> s.fileno()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
io.UnsupportedOperation: fileno
```
as opposed to Python 2:
```py
>>> from StringIO import StringIO
>>> s = StringIO()
>>> hasattr(s, 'fileno')
False
>>> s.fileno()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: StringIO instance has no attribute 'fileno'
```
This then causes the Travis failure in Python 3 as well.