bpo-40077: Convert _abc module to use PyType_FromSpec() (GH-19202)
Replace statically allocated types with heap allocated types:
use PyType_FromSpec().
Add a module state to store the _abc_data_type.
Add traverse, clear and free functions to the module.
diff --git a/Lib/test/test_abc.py b/Lib/test/test_abc.py
index 000e583..7e9c47b 100644
--- a/Lib/test/test_abc.py
+++ b/Lib/test/test_abc.py
@@ -326,7 +326,7 @@
token_old = abc_get_cache_token()
A.register(B)
token_new = abc_get_cache_token()
- self.assertNotEqual(token_old, token_new)
+ self.assertGreater(token_new, token_old)
self.assertTrue(isinstance(b, A))
self.assertTrue(isinstance(b, (A,)))