bpo-30463: Add an empty __slots__ to abc.ABC.
diff --git a/Lib/abc.py b/Lib/abc.py
index 43a34a0..d13a0de 100644
--- a/Lib/abc.py
+++ b/Lib/abc.py
@@ -235,7 +235,7 @@
"""Helper class that provides a standard way to create an ABC using
inheritance.
"""
- pass
+ __slots__ = ()
def get_cache_token():
diff --git a/Lib/test/test_abc.py b/Lib/test/test_abc.py
index e20e033..61c2876 100644
--- a/Lib/test/test_abc.py
+++ b/Lib/test/test_abc.py
@@ -402,6 +402,9 @@
C()
self.assertEqual(B.counter, 1)
+ def test_ABC_has___slots__(self):
+ self.assertTrue(hasattr(abc.ABC, '__slots__'))
+
class TestABCWithInitSubclass(unittest.TestCase):
def test_works_with_init_subclass(self):