just throw a normal AttributeError for no buffer attribute
diff --git a/Misc/NEWS b/Misc/NEWS
index 407681b..1ec5c53 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -15,6 +15,9 @@
 Library
 -------
 
+- Accessing io.StringIO.buffer now raises an AttributeError instead of
+  io.UnsupportedOperation.
+
 - Issue #6271: mmap tried to close invalid file handle (-1) when annonymous.
   (On Unix)