diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index 14e3766a34377b..505d4bea83fe8d 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -1153,8 +1153,9 @@ def refcount_test(test):
def requires_limited_api(test):
try:
import _testcapi
+ import _testlimitedcapi
except ImportError:
- return unittest.skip('needs _testcapi module')(test)
+ return unittest.skip('needs _testcapi and _testlimitedcapi modules')(test)
return test
def requires_specialization(test):
diff --git a/Lib/test/test_call.py b/Lib/test/test_call.py
index 2a6a5d287b04ee..eaf919584b4c64 100644
--- a/Lib/test/test_call.py
+++ b/Lib/test/test_call.py
@@ -5,6 +5,10 @@
import _testcapi
except ImportError:
_testcapi = None
+try:
+ import _testlimitedcapi
+except ImportError:
+ _testlimitedcapi = None
import struct
import collections
import itertools
@@ -837,12 +841,12 @@ def get_a(x):
@requires_limited_api
def test_vectorcall_limited_incoming(self):
from _testcapi import pyobject_vectorcall
- obj = _testcapi.LimitedVectorCallClass()
+ obj = _testlimitedcapi.LimitedVectorCallClass()
self.assertEqual(pyobject_vectorcall(obj, (), ()), "vectorcall called")
@requires_limited_api
def test_vectorcall_limited_outgoing(self):
- from _testcapi import call_vectorcall
+ from _testlimitedcapi import call_vectorcall
args_captured = []
kwargs_captured = []
@@ -858,7 +862,7 @@ def f(*args, **kwargs):
@requires_limited_api
def test_vectorcall_limited_outgoing_method(self):
- from _testcapi import call_vectorcall_method
+ from _testlimitedcapi import call_vectorcall_method
args_captured = []
kwargs_captured = []
diff --git a/Lib/test/test_capi/test_misc.py b/Lib/test/test_capi/test_misc.py
index 67fbef4f269814..64c0da6e3cc06e 100644
--- a/Lib/test/test_capi/test_misc.py
+++ b/Lib/test/test_capi/test_misc.py
@@ -47,6 +47,7 @@
# Skip this test if the _testcapi module isn't available.
_testcapi = import_helper.import_module('_testcapi')
+import _testlimitedcapi
import _testinternalcapi
@@ -1124,7 +1125,7 @@ def test_heaptype_relative_sizes(self):
# Test subclassing using "relative" basicsize, see PEP 697
def check(extra_base_size, extra_size):
Base, Sub, instance, data_ptr, data_offset, data_size = (
- _testcapi.make_sized_heaptypes(
+ _testlimitedcapi.make_sized_heaptypes(
extra_base_size, -extra_size))
# no alignment shenanigans when inheriting directly
@@ -1152,11 +1153,11 @@ def check(extra_base_size, extra_size):
# we don't reserve (requested + alignment) or more data
self.assertLess(data_size - extra_size,
- _testcapi.ALIGNOF_MAX_ALIGN_T)
+ _testlimitedcapi.ALIGNOF_MAX_ALIGN_T)
# The offsets/sizes we calculated should be aligned.
- self.assertEqual(data_offset % _testcapi.ALIGNOF_MAX_ALIGN_T, 0)
- self.assertEqual(data_size % _testcapi.ALIGNOF_MAX_ALIGN_T, 0)
+ self.assertEqual(data_offset % _testlimitedcapi.ALIGNOF_MAX_ALIGN_T, 0)
+ self.assertEqual(data_size % _testlimitedcapi.ALIGNOF_MAX_ALIGN_T, 0)
sizes = sorted({0, 1, 2, 3, 4, 7, 8, 123,
object.__basicsize__,
@@ -1182,7 +1183,7 @@ def test_heaptype_inherit_itemsize(self):
object.__basicsize__+1})
for extra_size in sizes:
with self.subTest(extra_size=extra_size):
- Sub = _testcapi.subclass_var_heaptype(
+ Sub = _testlimitedcapi.subclass_var_heaptype(
_testcapi.HeapCCollection, -extra_size, 0, 0)
collection = Sub(1, 2, 3)
collection.set_data_to_3s()
@@ -1196,7 +1197,7 @@ def test_heaptype_invalid_inheritance(self):
with self.assertRaises(SystemError,
msg="Cannot extend variable-size class without "
+ "Py_TPFLAGS_ITEMS_AT_END"):
- _testcapi.subclass_heaptype(int, -8, 0)
+ _testlimitedcapi.subclass_heaptype(int, -8, 0)
def test_heaptype_relative_members(self):
"""Test HeapCCollection subclasses work properly"""
@@ -1209,7 +1210,7 @@ def test_heaptype_relative_members(self):
for offset in sizes:
with self.subTest(extra_base_size=extra_base_size, extra_size=extra_size, offset=offset):
if offset < extra_size:
- Sub = _testcapi.make_heaptype_with_member(
+ Sub = _testlimitedcapi.make_heaptype_with_member(
extra_base_size, -extra_size, offset, True)
Base = Sub.mro()[1]
instance = Sub()
@@ -1228,29 +1229,29 @@ def test_heaptype_relative_members(self):
instance.set_memb_relative(0)
else:
with self.assertRaises(SystemError):
- Sub = _testcapi.make_heaptype_with_member(
+ Sub = _testlimitedcapi.make_heaptype_with_member(
extra_base_size, -extra_size, offset, True)
with self.assertRaises(SystemError):
- Sub = _testcapi.make_heaptype_with_member(
+ Sub = _testlimitedcapi.make_heaptype_with_member(
extra_base_size, extra_size, offset, True)
with self.subTest(extra_base_size=extra_base_size, extra_size=extra_size):
with self.assertRaises(SystemError):
- Sub = _testcapi.make_heaptype_with_member(
+ Sub = _testlimitedcapi.make_heaptype_with_member(
extra_base_size, -extra_size, -1, True)
def test_heaptype_relative_members_errors(self):
with self.assertRaisesRegex(
SystemError,
r"With Py_RELATIVE_OFFSET, basicsize must be negative"):
- _testcapi.make_heaptype_with_member(0, 1234, 0, True)
+ _testlimitedcapi.make_heaptype_with_member(0, 1234, 0, True)
with self.assertRaisesRegex(
SystemError, r"Member offset out of range \(0\.\.-basicsize\)"):
- _testcapi.make_heaptype_with_member(0, -8, 1234, True)
+ _testlimitedcapi.make_heaptype_with_member(0, -8, 1234, True)
with self.assertRaisesRegex(
SystemError, r"Member offset out of range \(0\.\.-basicsize\)"):
- _testcapi.make_heaptype_with_member(0, -8, -1, True)
+ _testlimitedcapi.make_heaptype_with_member(0, -8, -1, True)
- Sub = _testcapi.make_heaptype_with_member(0, -8, 0, True)
+ Sub = _testlimitedcapi.make_heaptype_with_member(0, -8, 0, True)
instance = Sub()
with self.assertRaisesRegex(
SystemError, r"PyMember_GetOne used with Py_RELATIVE_OFFSET"):
@@ -2264,10 +2265,19 @@ def test_gilstate_matches_current(self):
_testcapi.test_current_tstate_matches()
+def get_test_funcs(mod, exclude_prefix=None):
+ funcs = {}
+ for name in dir(mod):
+ if not name.startswith('test_'):
+ continue
+ if exclude_prefix is not None and name.startswith(exclude_prefix):
+ continue
+ funcs[name] = getattr(mod, name)
+ return funcs
+
+
class Test_testcapi(unittest.TestCase):
- locals().update((name, getattr(_testcapi, name))
- for name in dir(_testcapi)
- if name.startswith('test_'))
+ locals().update(get_test_funcs(_testcapi))
# Suppress warning from PyUnicode_FromUnicode().
@warnings_helper.ignore_warnings(category=DeprecationWarning)
@@ -2278,11 +2288,13 @@ def test_version_api_data(self):
self.assertEqual(_testcapi.Py_Version, sys.hexversion)
+class Test_testlimitedcapi(unittest.TestCase):
+ locals().update(get_test_funcs(_testlimitedcapi))
+
+
class Test_testinternalcapi(unittest.TestCase):
- locals().update((name, getattr(_testinternalcapi, name))
- for name in dir(_testinternalcapi)
- if name.startswith('test_')
- and not name.startswith('test_lock_'))
+ locals().update(get_test_funcs(_testinternalcapi,
+ exclude_prefix='test_lock_'))
@threading_helper.requires_working_threading()
diff --git a/Modules/Setup.stdlib.in b/Modules/Setup.stdlib.in
index 73b082691a3fd4..3d8bcfc3530e48 100644
--- a/Modules/Setup.stdlib.in
+++ b/Modules/Setup.stdlib.in
@@ -162,7 +162,8 @@
@MODULE__XXTESTFUZZ_TRUE@_xxtestfuzz _xxtestfuzz/_xxtestfuzz.c _xxtestfuzz/fuzzer.c
@MODULE__TESTBUFFER_TRUE@_testbuffer _testbuffer.c
@MODULE__TESTINTERNALCAPI_TRUE@_testinternalcapi _testinternalcapi.c _testinternalcapi/test_lock.c _testinternalcapi/pytime.c _testinternalcapi/set.c _testinternalcapi/test_critical_sections.c
-@MODULE__TESTCAPI_TRUE@_testcapi _testcapimodule.c _testcapi/vectorcall.c _testcapi/vectorcall_limited.c _testcapi/heaptype.c _testcapi/abstract.c _testcapi/bytearray.c _testcapi/bytes.c _testcapi/unicode.c _testcapi/dict.c _testcapi/set.c _testcapi/list.c _testcapi/tuple.c _testcapi/getargs.c _testcapi/datetime.c _testcapi/docstring.c _testcapi/mem.c _testcapi/watchers.c _testcapi/long.c _testcapi/float.c _testcapi/complex.c _testcapi/numbers.c _testcapi/structmember.c _testcapi/exceptions.c _testcapi/code.c _testcapi/buffer.c _testcapi/pyatomic.c _testcapi/pyos.c _testcapi/file.c _testcapi/codec.c _testcapi/immortal.c _testcapi/heaptype_relative.c _testcapi/gc.c _testcapi/sys.c _testcapi/hash.c _testcapi/time.c
+@MODULE__TESTCAPI_TRUE@_testcapi _testcapimodule.c _testcapi/vectorcall.c _testcapi/heaptype.c _testcapi/abstract.c _testcapi/bytearray.c _testcapi/bytes.c _testcapi/unicode.c _testcapi/dict.c _testcapi/set.c _testcapi/list.c _testcapi/tuple.c _testcapi/getargs.c _testcapi/datetime.c _testcapi/docstring.c _testcapi/mem.c _testcapi/watchers.c _testcapi/long.c _testcapi/float.c _testcapi/complex.c _testcapi/numbers.c _testcapi/structmember.c _testcapi/exceptions.c _testcapi/code.c _testcapi/buffer.c _testcapi/pyatomic.c _testcapi/pyos.c _testcapi/file.c _testcapi/codec.c _testcapi/immortal.c _testcapi/gc.c _testcapi/sys.c _testcapi/hash.c _testcapi/time.c
+@MODULE__TESTCAPI_TRUE@_testlimitedcapi _testlimitedcapi.c _testlimitedcapi/vectorcall_limited.c _testlimitedcapi/heaptype_relative.c
@MODULE__TESTCLINIC_TRUE@_testclinic _testclinic.c
@MODULE__TESTCLINIC_LIMITED_TRUE@_testclinic_limited _testclinic_limited.c
diff --git a/Modules/_testcapi/clinic/vectorcall_limited.c.h b/Modules/_testcapi/clinic/vectorcall_limited.c.h
deleted file mode 100644
index a233aefec79ecd..00000000000000
--- a/Modules/_testcapi/clinic/vectorcall_limited.c.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*[clinic input]
-preserve
-[clinic start generated code]*/
-
-PyDoc_STRVAR(_testcapi_call_vectorcall__doc__,
-"call_vectorcall($module, callable, /)\n"
-"--\n"
-"\n");
-
-#define _TESTCAPI_CALL_VECTORCALL_METHODDEF \
- {"call_vectorcall", (PyCFunction)_testcapi_call_vectorcall, METH_O, _testcapi_call_vectorcall__doc__},
-
-PyDoc_STRVAR(_testcapi_call_vectorcall_method__doc__,
-"call_vectorcall_method($module, callable, /)\n"
-"--\n"
-"\n");
-
-#define _TESTCAPI_CALL_VECTORCALL_METHOD_METHODDEF \
- {"call_vectorcall_method", (PyCFunction)_testcapi_call_vectorcall_method, METH_O, _testcapi_call_vectorcall_method__doc__},
-/*[clinic end generated code: output=e980906a39602528 input=a9049054013a1b77]*/
diff --git a/Modules/_testcapi/parts.h b/Modules/_testcapi/parts.h
index e8cfb2423500d4..2a043cfa73fa8b 100644
--- a/Modules/_testcapi/parts.h
+++ b/Modules/_testcapi/parts.h
@@ -61,7 +61,4 @@ int _PyTestCapi_Init_Sys(PyObject *module);
int _PyTestCapi_Init_Hash(PyObject *module);
int _PyTestCapi_Init_Time(PyObject *module);
-int _PyTestCapi_Init_VectorcallLimited(PyObject *module);
-int _PyTestCapi_Init_HeaptypeRelative(PyObject *module);
-
#endif // Py_TESTCAPI_PARTS_H
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index b03f871b089c8a..b6536045e645f9 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -4098,12 +4098,6 @@ PyInit__testcapi(void)
if (_PyTestCapi_Init_PyAtomic(m) < 0) {
return NULL;
}
- if (_PyTestCapi_Init_VectorcallLimited(m) < 0) {
- return NULL;
- }
- if (_PyTestCapi_Init_HeaptypeRelative(m) < 0) {
- return NULL;
- }
if (_PyTestCapi_Init_Hash(m) < 0) {
return NULL;
}
diff --git a/Modules/_testlimitedcapi.c b/Modules/_testlimitedcapi.c
new file mode 100644
index 00000000000000..da09e3f5084464
--- /dev/null
+++ b/Modules/_testlimitedcapi.c
@@ -0,0 +1,36 @@
+/*
+ * Test the limited C API.
+ *
+ * The 'test_*' functions exported by this module are run as part of the
+ * standard Python regression test, via Lib/test/test_capi.py.
+ */
+
+#include "_testlimitedcapi/parts.h"
+
+static PyMethodDef TestMethods[] = {
+ {NULL, NULL} /* sentinel */
+};
+
+static struct PyModuleDef _testlimitedcapimodule = {
+ PyModuleDef_HEAD_INIT,
+ .m_name = "_testlimitedcapi",
+ .m_size = 0,
+ .m_methods = TestMethods,
+};
+
+PyMODINIT_FUNC
+PyInit__testlimitedcapi(void)
+{
+ PyObject *mod = PyModule_Create(&_testlimitedcapimodule);
+ if (mod == NULL) {
+ return NULL;
+ }
+
+ if (_PyTestCapi_Init_VectorcallLimited(mod) < 0) {
+ return NULL;
+ }
+ if (_PyTestCapi_Init_HeaptypeRelative(mod) < 0) {
+ return NULL;
+ }
+ return mod;
+}
diff --git a/Modules/_testlimitedcapi/clinic/vectorcall_limited.c.h b/Modules/_testlimitedcapi/clinic/vectorcall_limited.c.h
new file mode 100644
index 00000000000000..6631a9c42deab0
--- /dev/null
+++ b/Modules/_testlimitedcapi/clinic/vectorcall_limited.c.h
@@ -0,0 +1,20 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(_testlimitedcapi_call_vectorcall__doc__,
+"call_vectorcall($module, callable, /)\n"
+"--\n"
+"\n");
+
+#define _TESTLIMITEDCAPI_CALL_VECTORCALL_METHODDEF \
+ {"call_vectorcall", (PyCFunction)_testlimitedcapi_call_vectorcall, METH_O, _testlimitedcapi_call_vectorcall__doc__},
+
+PyDoc_STRVAR(_testlimitedcapi_call_vectorcall_method__doc__,
+"call_vectorcall_method($module, callable, /)\n"
+"--\n"
+"\n");
+
+#define _TESTLIMITEDCAPI_CALL_VECTORCALL_METHOD_METHODDEF \
+ {"call_vectorcall_method", (PyCFunction)_testlimitedcapi_call_vectorcall_method, METH_O, _testlimitedcapi_call_vectorcall_method__doc__},
+/*[clinic end generated code: output=5976b9b360e1ff30 input=a9049054013a1b77]*/
diff --git a/Modules/_testcapi/heaptype_relative.c b/Modules/_testlimitedcapi/heaptype_relative.c
similarity index 100%
rename from Modules/_testcapi/heaptype_relative.c
rename to Modules/_testlimitedcapi/heaptype_relative.c
diff --git a/Modules/_testlimitedcapi/parts.h b/Modules/_testlimitedcapi/parts.h
new file mode 100644
index 00000000000000..ac23c0afdbbc7b
--- /dev/null
+++ b/Modules/_testlimitedcapi/parts.h
@@ -0,0 +1,25 @@
+#ifndef Py_TESTLIMITEDCAPI_PARTS_H
+#define Py_TESTLIMITEDCAPI_PARTS_H
+
+// Always enable assertions
+#undef NDEBUG
+
+// Use the limited C API
+#ifndef Py_GIL_DISABLED
+# define Py_LIMITED_API 0x030c0000 // 3.12
+#endif
+
+// Make sure that the internal C API cannot be used.
+#undef Py_BUILD_CORE_MODULE
+#undef Py_BUILD_CORE_BUILTIN
+
+#include "Python.h"
+
+#ifdef Py_BUILD_CORE
+# error "Py_BUILD_CORE macro must not be defined"
+#endif
+
+int _PyTestCapi_Init_VectorcallLimited(PyObject *module);
+int _PyTestCapi_Init_HeaptypeRelative(PyObject *module);
+
+#endif // Py_TESTLIMITEDCAPI_PARTS_H
diff --git a/Modules/_testcapi/vectorcall_limited.c b/Modules/_testlimitedcapi/vectorcall_limited.c
similarity index 86%
rename from Modules/_testcapi/vectorcall_limited.c
rename to Modules/_testlimitedcapi/vectorcall_limited.c
index d7070d37bb9e9b..4d6bf7568de4af 100644
--- a/Modules/_testcapi/vectorcall_limited.c
+++ b/Modules/_testlimitedcapi/vectorcall_limited.c
@@ -2,17 +2,13 @@
#include "pyconfig.h" // Py_GIL_DISABLED
-#ifndef Py_GIL_DISABLED
-#define Py_LIMITED_API 0x030c0000 // 3.12
-#endif
-
#include "parts.h"
#include "clinic/vectorcall_limited.c.h"
/*[clinic input]
-module _testcapi
+module _testlimitedcapi
[clinic start generated code]*/
-/*[clinic end generated code: output=da39a3ee5e6b4b0d input=6361033e795369fc]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=2700057f9c1135ba]*/
static PyObject *
LimitedVectorCallClass_tpcall(PyObject *self, PyObject *args, PyObject *kwargs) {
@@ -40,15 +36,15 @@ LimitedVectorCallClass_new(PyTypeObject *tp, PyTypeObject *a, PyTypeObject *kw)
}
/*[clinic input]
-_testcapi.call_vectorcall
+_testlimitedcapi.call_vectorcall
callable: object
/
[clinic start generated code]*/
static PyObject *
-_testcapi_call_vectorcall(PyObject *module, PyObject *callable)
-/*[clinic end generated code: output=bae81eec97fcaad7 input=55d88f92240957ee]*/
+_testlimitedcapi_call_vectorcall(PyObject *module, PyObject *callable)
+/*[clinic end generated code: output=9cbb7832263a8eef input=0743636c12dccb28]*/
{
PyObject *args[3] = { NULL, NULL, NULL };
PyObject *kwname = NULL, *kwnames = NULL, *result = NULL;
@@ -93,15 +89,15 @@ _testcapi_call_vectorcall(PyObject *module, PyObject *callable)
}
/*[clinic input]
-_testcapi.call_vectorcall_method
+_testlimitedcapi.call_vectorcall_method
callable: object
/
[clinic start generated code]*/
static PyObject *
-_testcapi_call_vectorcall_method(PyObject *module, PyObject *callable)
-/*[clinic end generated code: output=e661f48dda08b6fb input=5ba81c27511395b6]*/
+_testlimitedcapi_call_vectorcall_method(PyObject *module, PyObject *callable)
+/*[clinic end generated code: output=4558323a46cc09eb input=a736f7dbf15f1be5]*/
{
PyObject *args[3] = { NULL, NULL, NULL };
PyObject *name = NULL, *kwname = NULL,
@@ -167,7 +163,7 @@ static PyType_Slot LimitedVectorallClass_slots[] = {
};
static PyType_Spec LimitedVectorCallClass_spec = {
- .name = "_testcapi.LimitedVectorCallClass",
+ .name = "_testlimitedcapi.LimitedVectorCallClass",
.basicsize = (int)(sizeof(PyObject) + sizeof(vectorcallfunc)),
.flags = Py_TPFLAGS_DEFAULT
| Py_TPFLAGS_HAVE_VECTORCALL
@@ -176,8 +172,8 @@ static PyType_Spec LimitedVectorCallClass_spec = {
};
static PyMethodDef TestMethods[] = {
- _TESTCAPI_CALL_VECTORCALL_METHODDEF
- _TESTCAPI_CALL_VECTORCALL_METHOD_METHODDEF
+ _TESTLIMITEDCAPI_CALL_VECTORCALL_METHODDEF
+ _TESTLIMITEDCAPI_CALL_VECTORCALL_METHOD_METHODDEF
{NULL},
};
diff --git a/PCbuild/_testcapi.vcxproj b/PCbuild/_testcapi.vcxproj
index 66df0a61b5b5a6..3ca4c5f86c783c 100644
--- a/PCbuild/_testcapi.vcxproj
+++ b/PCbuild/_testcapi.vcxproj
@@ -96,9 +96,7 @@
-
-
diff --git a/PCbuild/_testlimitedcapi.vcxproj b/PCbuild/_testlimitedcapi.vcxproj
new file mode 100644
index 00000000000000..1b27942c1da9ae
--- /dev/null
+++ b/PCbuild/_testlimitedcapi.vcxproj
@@ -0,0 +1,116 @@
+
+
+
+
+ Debug
+ ARM
+
+
+ Debug
+ ARM64
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ PGInstrument
+ ARM
+
+
+ PGInstrument
+ ARM64
+
+
+ PGInstrument
+ Win32
+
+
+ PGInstrument
+ x64
+
+
+ PGUpdate
+ ARM
+
+
+ PGUpdate
+ ARM64
+
+
+ PGUpdate
+ Win32
+
+
+ PGUpdate
+ x64
+
+
+ Release
+ ARM
+
+
+ Release
+ ARM64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}
+ _testlimitedcapi
+ Win32Proj
+ false
+
+
+
+
+ DynamicLibrary
+ NotSet
+
+
+
+ $(PyStdlibPydExt)
+
+
+
+
+
+
+
+
+
+ <_ProjectFileVersion>10.0.30319.1
+
+
+
+
+
+
+
+
+
+
+
+ {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}
+ false
+
+
+ {885d4898-d08d-4091-9c40-c700cfe3fc5a}
+ false
+
+
+
+
+
+
\ No newline at end of file
diff --git a/PCbuild/_testlimitedcapi.vcxproj.filters b/PCbuild/_testlimitedcapi.vcxproj.filters
new file mode 100644
index 00000000000000..c4764a55f410a0
--- /dev/null
+++ b/PCbuild/_testlimitedcapi.vcxproj.filters
@@ -0,0 +1,25 @@
+
+
+
+
+ {a76a90d8-8e8b-4c36-8f58-8bd46abe9f5e}
+
+
+ {071b2ff4-e5a1-4e79-b0c5-cf46b0094a80}
+
+
+
+
+ Source Files
+
+
+ Source Files
+
+
+
+
+
+ Resource Files
+
+
+
\ No newline at end of file
diff --git a/PCbuild/pcbuild.proj b/PCbuild/pcbuild.proj
index b7b78be768d7ec..a2a637a3044373 100644
--- a/PCbuild/pcbuild.proj
+++ b/PCbuild/pcbuild.proj
@@ -77,7 +77,7 @@
-
+
diff --git a/PCbuild/pcbuild.sln b/PCbuild/pcbuild.sln
index a0b5fbd1304b41..d10e1c46a91480 100644
--- a/PCbuild/pcbuild.sln
+++ b/PCbuild/pcbuild.sln
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.30028.174
+# Visual Studio Version 17
+VisualStudioVersion = 17.8.34525.116
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{553EC33E-9816-4996-A660-5D6186A0B0B3}"
ProjectSection(SolutionItems) = preProject
@@ -159,6 +159,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_wmi", "_wmi.vcxproj", "{54
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testclinic_limited", "_testclinic_limited.vcxproj", "{01FDF29A-40A1-46DF-84F5-85EBBD2A2410}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testlimitedcapi", "_testlimitedcapi.vcxproj", "{7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM = Debug|ARM
@@ -1648,6 +1650,38 @@ Global
{01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.Release|Win32.Build.0 = Release|Win32
{01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.Release|x64.ActiveCfg = Release|x64
{01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.Release|x64.Build.0 = Release|x64
+ {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.Debug|ARM.ActiveCfg = Debug|ARM
+ {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.Debug|ARM.Build.0 = Debug|ARM
+ {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.Debug|ARM64.ActiveCfg = Debug|ARM64
+ {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.Debug|ARM64.Build.0 = Debug|ARM64
+ {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.Debug|Win32.ActiveCfg = Debug|Win32
+ {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.Debug|Win32.Build.0 = Debug|Win32
+ {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.Debug|x64.ActiveCfg = Debug|x64
+ {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.Debug|x64.Build.0 = Debug|x64
+ {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM
+ {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.PGInstrument|ARM.Build.0 = PGInstrument|ARM
+ {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64
+ {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64
+ {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
+ {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
+ {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
+ {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.PGInstrument|x64.Build.0 = PGInstrument|x64
+ {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM
+ {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.PGUpdate|ARM.Build.0 = PGUpdate|ARM
+ {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64
+ {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64
+ {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
+ {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
+ {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
+ {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.PGUpdate|x64.Build.0 = PGUpdate|x64
+ {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.Release|ARM.ActiveCfg = Release|ARM
+ {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.Release|ARM.Build.0 = Release|ARM
+ {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.Release|ARM64.ActiveCfg = Release|ARM64
+ {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.Release|ARM64.Build.0 = Release|ARM64
+ {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.Release|Win32.ActiveCfg = Release|Win32
+ {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.Release|Win32.Build.0 = Release|Win32
+ {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.Release|x64.ActiveCfg = Release|x64
+ {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/PCbuild/readme.txt b/PCbuild/readme.txt
index a7c2a68928ca84..1fdd8a4a5ab52b 100644
--- a/PCbuild/readme.txt
+++ b/PCbuild/readme.txt
@@ -131,29 +131,31 @@ xxlimited_35
The following sub-projects are for individual modules of the standard
library which are implemented in C; each one builds a DLL (renamed to
.pyd) of the same name as the project:
-_asyncio
-_ctypes
-_ctypes_test
-_zoneinfo
-_decimal
-_elementtree
-_hashlib
-_multiprocessing
-_overlapped
-_socket
-_testbuffer
-_testcapi
-_testclinic
-_testclinic_limited
-_testconsole
-_testimportmultiple
-_testmultiphase
-_testsinglephase
-_tkinter
-pyexpat
-select
-unicodedata
-winsound
+ * _asyncio
+ * _ctypes
+ * _ctypes_test
+ * _zoneinfo
+ * _decimal
+ * _elementtree
+ * _hashlib
+ * _multiprocessing
+ * _overlapped
+ * _socket
+ * _testbuffer
+ * _testcapi
+ * _testlimitedcapi
+ * _testinternalcapi
+ * _testclinic
+ * _testclinic_limited
+ * _testconsole
+ * _testimportmultiple
+ * _testmultiphase
+ * _testsinglephase
+ * _tkinter
+ * pyexpat
+ * select
+ * unicodedata
+ * winsound
The following Python-controlled sub-projects wrap external projects.
Note that these external libraries are not necessary for a working
@@ -309,6 +311,8 @@ _testclinic_limited extension, the file Modules/_testclinic_limited.c:
* In PCbuild/, copy _testclinic.vcxproj to _testclinic_limited.vcxproj,
replace RootNamespace value with `_testclinic_limited`, replace
`_asyncio.c` with `_testclinic_limited.c`.
+* In PCbuild/, copy _testclinic.vcxproj.filters to
+ _testclinic_limited.vcxproj.filters, edit the list of files in the new file.
* Open Visual Studio, open PCbuild\pcbuild.sln solution, add the
PCbuild\_testclinic_limited.vcxproj project to the solution ("add existing
project).
diff --git a/Tools/msi/test/test_files.wxs b/Tools/msi/test/test_files.wxs
index bb9b258692a62f..6862a5899db2ba 100644
--- a/Tools/msi/test/test_files.wxs
+++ b/Tools/msi/test/test_files.wxs
@@ -1,6 +1,6 @@
-
+
diff --git a/configure b/configure
index c758749cd371ed..195d4332cd13d3 100755
--- a/configure
+++ b/configure
@@ -27255,6 +27255,7 @@ SRCDIRS="\
Modules/_sre \
Modules/_testcapi \
Modules/_testinternalcapi \
+ Modules/_testlimitedcapi \
Modules/_xxtestfuzz \
Modules/cjkcodecs \
Modules/expat \
diff --git a/configure.ac b/configure.ac
index 80d0a7edc7cad4..800b25308305cb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6767,6 +6767,7 @@ SRCDIRS="\
Modules/_sre \
Modules/_testcapi \
Modules/_testinternalcapi \
+ Modules/_testlimitedcapi \
Modules/_xxtestfuzz \
Modules/cjkcodecs \
Modules/expat \