bpo-39489: Remove COUNT_ALLOCS special build (GH-18259)
Remove:
* COUNT_ALLOCS macro
* sys.getcounts() function
* SHOW_ALLOC_COUNT code in listobject.c
* SHOW_TRACK_COUNT code in tupleobject.c
* PyConfig.show_alloc_count field
* -X showalloccount command line option
* @test.support.requires_type_collecting decorator
diff --git a/Lib/test/test_gc.py b/Lib/test/test_gc.py
index 18f8d10..acb6391 100644
--- a/Lib/test/test_gc.py
+++ b/Lib/test/test_gc.py
@@ -2,7 +2,7 @@
import unittest.mock
from test.support import (verbose, refcount_test, run_unittest,
cpython_only, start_threads,
- temp_dir, requires_type_collecting, TESTFN, unlink,
+ temp_dir, TESTFN, unlink,
import_module)
from test.support.script_helper import assert_python_ok, make_script
@@ -131,7 +131,6 @@
del a
self.assertNotEqual(gc.collect(), 0)
- @requires_type_collecting
def test_newinstance(self):
class A(object):
pass
@@ -709,7 +708,6 @@
stderr = run_command(code % "gc.DEBUG_SAVEALL")
self.assertNotIn(b"uncollectable objects at shutdown", stderr)
- @requires_type_collecting
def test_gc_main_module_at_shutdown(self):
# Create a reference cycle through the __main__ module and check
# it gets collected at interpreter shutdown.
@@ -723,7 +721,6 @@
rc, out, err = assert_python_ok('-c', code)
self.assertEqual(out.strip(), b'__del__ called')
- @requires_type_collecting
def test_gc_ordinary_module_at_shutdown(self):
# Same as above, but with a non-__main__ module.
with temp_dir() as script_dir:
@@ -743,7 +740,6 @@
rc, out, err = assert_python_ok('-c', code)
self.assertEqual(out.strip(), b'__del__ called')
- @requires_type_collecting
def test_global_del_SystemExit(self):
code = """if 1:
class ClassWithDel: