Release 0.0.10.
authorRobert Collins <robertc@robertcollins.net>
Thu, 7 Feb 2013 11:33:11 +0000 (00:33 +1300)
committerRobert Collins <robertc@robertcollins.net>
Thu, 7 Feb 2013 11:33:11 +0000 (00:33 +1300)
NEWS
README
configure.ac
python/subunit/__init__.py

diff --git a/NEWS b/NEWS
index 0457607..129f99b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,9 @@ subunit release notes
 NEXT (In development)
 ---------------------
 
+0.0.10
+------
+
 BUG FIXES
 ~~~~~~~~~
 
diff --git a/README b/README
index e397195..aab5faf 100644 (file)
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
 
   subunit: A streaming protocol for test results
-  Copyright (C) 2005-2009 Robert Collins <robertc@robertcollins.net>
+  Copyright (C) 2005-2013 Robert Collins <robertc@robertcollins.net>
 
   Licensed under either the Apache License, Version 2.0 or the BSD 3-clause
   license at the users choice. A copy of both licenses are available in the
index cf21d55..8c300ee 100644 (file)
@@ -1,6 +1,6 @@
 m4_define([SUBUNIT_MAJOR_VERSION], [0])
 m4_define([SUBUNIT_MINOR_VERSION], [0])
-m4_define([SUBUNIT_MICRO_VERSION], [9])
+m4_define([SUBUNIT_MICRO_VERSION], [10])
 m4_define([SUBUNIT_VERSION],
 m4_defn([SUBUNIT_MAJOR_VERSION]).m4_defn([SUBUNIT_MINOR_VERSION]).m4_defn([SUBUNIT_MICRO_VERSION]))
 AC_PREREQ([2.59])
index f870904..77f4a82 100644 (file)
@@ -159,7 +159,7 @@ from subunit import chunked, details, iso8601, test_results
 # If the releaselevel is 'final', then the tarball will be major.minor.micro.
 # Otherwise it is major.minor.micro~$(revno).
 
-__version__ = (0, 0, 9, 'final', 0)
+__version__ = (0, 0, 10, 'final', 0)
 
 PROGRESS_SET = 0
 PROGRESS_CUR = 1
@@ -1301,14 +1301,17 @@ def _make_binary_on_windows(fileno):
 def _unwrap_text(stream):
     """Unwrap stream if it is a text stream to get the original buffer."""
     if sys.version_info > (3, 0):
+        unicode_type = str
+    else:
+        unicode_type = unicode
+    try:
+        # Read streams
+        if type(stream.read(0)) is unicode_type:
+            return stream.buffer
+    except (_UnsupportedOperation, IOError):
+        # Cannot read from the stream: try via writes
         try:
-            # Read streams
-            if type(stream.read(0)) is str:
-                return stream.buffer
-        except (_UnsupportedOperation, IOError):
-            # Cannot read from the stream: try via writes
-            try:
-                stream.write(_b(''))
-            except TypeError:
-                return stream.buffer
+            stream.write(_b(''))
+        except TypeError:
+            return stream.buffer
     return stream