[3.9] bpo-40514: Remove --with-experimental-isolated-subinterpreters in 3.9 (GH-20228)
Remove --with-experimental-isolated-subinterpreters configure option
in Python 3.9: the experiment continues in the master branch, but
it's no longer needed in 3.9.
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index 809a5ed..faee6bc 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -251,12 +251,6 @@
#define PyDict_MAXFREELIST 80
#endif
-/* bpo-40521: dict free lists are shared by all interpreters. */
-#ifdef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS
-# undef PyDict_MAXFREELIST
-# define PyDict_MAXFREELIST 0
-#endif
-
#if PyDict_MAXFREELIST > 0
static PyDictObject *free_list[PyDict_MAXFREELIST];
static int numfree = 0;
diff --git a/Objects/frameobject.c b/Objects/frameobject.c
index af32276..a2fc0a4 100644
--- a/Objects/frameobject.c
+++ b/Objects/frameobject.c
@@ -559,12 +559,6 @@
/* max value for numfree */
#define PyFrame_MAXFREELIST 200
-/* bpo-40521: frame free lists are shared by all interpreters. */
-#ifdef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS
-# undef PyFrame_MAXFREELIST
-# define PyFrame_MAXFREELIST 0
-#endif
-
#if PyFrame_MAXFREELIST > 0
static PyFrameObject *free_list = NULL;
static int numfree = 0; /* number of frames currently in free_list */
diff --git a/Objects/listobject.c b/Objects/listobject.c
index 37fadca..f9eb370 100644
--- a/Objects/listobject.c
+++ b/Objects/listobject.c
@@ -101,12 +101,6 @@
# define PyList_MAXFREELIST 80
#endif
-/* bpo-40521: list free lists are shared by all interpreters. */
-#ifdef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS
-# undef PyList_MAXFREELIST
-# define PyList_MAXFREELIST 0
-#endif
-
static PyListObject *free_list[PyList_MAXFREELIST];
static int numfree = 0;
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
index c0b59c0..9092c9f 100644
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -22,12 +22,6 @@
#define PyTuple_MAXFREELIST 2000 /* Maximum number of tuples of each size to save */
#endif
-/* bpo-40521: tuple free lists are shared by all interpreters. */
-#ifdef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS
-# undef PyTuple_MAXSAVESIZE
-# define PyTuple_MAXSAVESIZE 0
-#endif
-
#if PyTuple_MAXSAVESIZE > 0
/* Entries 1 up to PyTuple_MAXSAVESIZE are free lists, entry 0 is the empty
tuple () of which at most one instance will be allocated.
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 243f881..353423b 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -19,10 +19,7 @@
#include "clinic/typeobject.c.h"
-/* bpo-40521: Type method cache is shared by all subinterpreters */
-#ifndef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS
-# define MCACHE
-#endif
+#define MCACHE
#ifdef MCACHE
/* Support type attribute cache */
@@ -63,10 +60,7 @@
static size_t method_cache_collisions = 0;
#endif
-/* bpo-40521: Interned strings are shared by all subinterpreters */
-#ifndef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS
-# define INTERN_NAME_STRINGS
-#endif
+#define INTERN_NAME_STRINGS
/* alphabetical order */
_Py_IDENTIFIER(__abstractmethods__);
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index ea46a44..1082eb4 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -198,10 +198,7 @@
# define OVERALLOCATE_FACTOR 4
#endif
-/* bpo-40521: Interned strings are shared by all interpreters. */
-#ifndef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS
-# define INTERNED_STRINGS
-#endif
+#define INTERNED_STRINGS
/* This dictionary holds all interned unicode strings. Note that references
to strings in this dictionary are *not* counted in the string's ob_refcnt.
@@ -288,10 +285,7 @@
/* List of static strings. */
static _Py_Identifier *static_strings = NULL;
-/* bpo-40521: Latin1 singletons are shared by all interpreters. */
-#ifndef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS
-# define LATIN1_SINGLETONS
-#endif
+#define LATIN1_SINGLETONS
#ifdef LATIN1_SINGLETONS
/* Single character Unicode strings in the Latin-1 range are being