mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
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.
This commit is contained in:
parent
ce105541f8
commit
53e4c91725
2 changed files with 76 additions and 31 deletions
|
@ -326,7 +326,7 @@ def test_factory(abc_ABCMeta, abc_get_cache_token):
|
|||
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,)))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue