summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/_pyio.py4
-rw-r--r--Lib/test/test_memoryio.py2
2 files changed, 5 insertions, 1 deletions
diff --git a/Lib/_pyio.py b/Lib/_pyio.py
index 771d4ce..5a7d2ca 100644
--- a/Lib/_pyio.py
+++ b/Lib/_pyio.py
@@ -1834,3 +1834,7 @@ class StringIO(TextIOWrapper):
# TextIOWrapper tells the encoding in its repr. In StringIO,
# that's a implementation detail.
return object.__repr__(self)
+
+ @property
+ def encoding(self):
+ return None
diff --git a/Lib/test/test_memoryio.py b/Lib/test/test_memoryio.py
index b3fc042..ad04613 100644
--- a/Lib/test/test_memoryio.py
+++ b/Lib/test/test_memoryio.py
@@ -451,7 +451,7 @@ class PyStringIOTest(MemoryTestMixin, MemorySeekTestMixin, unittest.TestCase):
# These are just dummy values but we nevertheless check them for fear
# of unexpected breakage.
- self.assertEqual(memio.encoding, "utf-8")
+ self.assertTrue(memio.encoding is None)
self.assertEqual(memio.errors, "strict")
self.assertEqual(memio.line_buffering, False)