Issue #12175: RawIOBase.readall() now returns None if read() returns None.
diff --git a/Lib/_pyio.py b/Lib/_pyio.py
index fa00eb4..5474a4e 100644
--- a/Lib/_pyio.py
+++ b/Lib/_pyio.py
@@ -556,7 +556,11 @@
             if not data:
                 break
             res += data
-        return bytes(res)
+        if res:
+            return bytes(res)
+        else:
+            # b'' or None
+            return data
 
     def readinto(self, b):
         """Read up to len(b) bytes into b.