raise an ValueError in getvalue() on closed StringIO (closes #12161)

Thanks for Catalin Iacob for the patch.
diff --git a/Misc/NEWS b/Misc/NEWS
index e34bd48..ae2b5fa 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -83,6 +83,9 @@
 Library
 -------
 
+- Issue #12161: Cause StringIO.getvalue() to raise a ValueError when used on a
+  closed StringIO instance.
+
 - Issue #12182: Fix pydoc.HTMLDoc.multicolumn() if Python uses the new (true)
   division (python -Qnew). Patch written by Ralf W. Grosse-Kunstleve.