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/Doc/using/cmdline.rst b/Doc/using/cmdline.rst
index fb88673..2206e50 100644
--- a/Doc/using/cmdline.rst
+++ b/Doc/using/cmdline.rst
@@ -434,9 +434,6 @@
stored in a traceback of a trace. Use ``-X tracemalloc=NFRAME`` to start
tracing with a traceback limit of *NFRAME* frames. See the
:func:`tracemalloc.start` for more information.
- * ``-X showalloccount`` to output the total count of allocated objects for
- each type when the program finishes. This only works when Python was built with
- ``COUNT_ALLOCS`` defined.
* ``-X importtime`` to show how long each import takes. It shows module
name, cumulative time (including nested imports) and self time (excluding
nested imports). Note that its output may be broken in multi-threaded
@@ -479,6 +476,8 @@
Using ``-X dev`` option, check *encoding* and *errors* arguments on
string encoding and decoding operations.
+ The ``-X showalloccount`` option has been removed.
+
Options you shouldn't use
~~~~~~~~~~~~~~~~~~~~~~~~~