NEXT (In development)
---------------------
+BUG FIXES
+~~~~~~~~~
+
+* UnsupportedOperation is available in the Python2.6 io library, so ask
+ forgiveness rather than permission for obtaining it. (Robert Collins)
+
+* Streams with no fileno() attribute are now supported, but they are not
+ checked for being in binary mode: be sure to take care of that if using
+ the library yourself. (Robert Collins)
+
0.0.9
-----
import subprocess
import sys
import unittest
-if sys.version_info > (3, 0):
+try:
from io import UnsupportedOperation as _UnsupportedOperation
-else:
+except ImportError:
_UnsupportedOperation = AttributeError
"""
try:
fileno = stream.fileno()
- except _UnsupportedOperation:
+ except (_UnsupportedOperation, AttributeError):
pass
else:
_make_binary_on_windows(fileno)