Skip to content

Commit 1c5e597

Browse files
committed
unix: enable _testinternalcapi
This effectively reverts commit 5611869. The lack of this extension was undermining PGO. Enabling this on 3.11 was non-trivial because its bootstrap Python didn't want to link with this extension, which is typically built shared. It was easier to always build a host Python than to coerce CPython's build system to have its bootstrap Python work with this extension. AFAICT Python < 3.11 doesn't have any bootstrap issues with enabling this module.
1 parent c297200 commit 1c5e597

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

cpython-unix/extension-modules.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -473,15 +473,12 @@ _testimportmultiple:
473473
sources:
474474
- _testimportmultiple.c
475475

476-
# Similar deal as _testcapi. Extension exists to test the exported C API. Since
477-
# we're statically linking, assumptions are invalidated. So value of extension
478-
# is minimal.
479-
#
480-
# If we ever enable this, we should add $(srcdir)/Include/internal to includes,
481-
# otherwise it likely picks up public API.
476+
# Ideally we disable all test extensions. However, this one is used by a bunch
477+
# of tests, including tests that run during PGO profiling. We keep it enabled
478+
# so it doesn't break tests and undermine PGO.
482479
_testinternalcapi:
483-
disabled-targets:
484-
- .*
480+
includes:
481+
- Include/internal
485482
sources:
486483
- _testinternalcapi.c
487484

src/validation.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,7 @@ const GLOBAL_EXTENSIONS_POSIX: &[&str] = &[
673673
"_dbm",
674674
"_posixshmem",
675675
"_posixsubprocess",
676+
"_testinternalcapi",
676677
"fcntl",
677678
"grp",
678679
"posix",

0 commit comments

Comments
 (0)