From d1d8b4249696a29fb8eb7c2342549e4d45dbc6a0 Mon Sep 17 00:00:00 2001 From: Charlie Lin Date: Wed, 10 Sep 2025 17:48:27 +0000 Subject: [PATCH 1/5] Move Include/dynamic_annotations.h to be outside exten "C" --- Include/internal/pycore_pythread.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Include/internal/pycore_pythread.h b/Include/internal/pycore_pythread.h index 8457b07340f8dd..8d439d19830398 100644 --- a/Include/internal/pycore_pythread.h +++ b/Include/internal/pycore_pythread.h @@ -1,14 +1,15 @@ #ifndef Py_INTERNAL_PYTHREAD_H #define Py_INTERNAL_PYTHREAD_H -#ifdef __cplusplus -extern "C" { -#endif #ifndef Py_BUILD_CORE # error "this header requires Py_BUILD_CORE define" #endif #include "dynamic_annotations.h" // _Py_ANNOTATE_PURE_HAPPENS_BEFORE_MUTEX + +#ifdef __cplusplus +extern "C" { +#endif #include "pycore_llist.h" // struct llist_node // Get _POSIX_THREADS and _POSIX_SEMAPHORES macros if available From 5acdfc61f807a0573ac1765b2f8a4a759260a303 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Wed, 10 Sep 2025 17:49:56 +0000 Subject: [PATCH 2/5] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../next/C_API/2025-09-10-17-49-54.gh-issue-138762.1rG6GQ.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/C_API/2025-09-10-17-49-54.gh-issue-138762.1rG6GQ.rst diff --git a/Misc/NEWS.d/next/C_API/2025-09-10-17-49-54.gh-issue-138762.1rG6GQ.rst b/Misc/NEWS.d/next/C_API/2025-09-10-17-49-54.gh-issue-138762.1rG6GQ.rst new file mode 100644 index 00000000000000..8e685aad1af2e9 --- /dev/null +++ b/Misc/NEWS.d/next/C_API/2025-09-10-17-49-54.gh-issue-138762.1rG6GQ.rst @@ -0,0 +1 @@ +Move Include/dynamic_annotations.h to be outside extern "C" From f339844718629ab421e4378a01a8d74bd64a84f8 Mon Sep 17 00:00:00 2001 From: Charlie Lin Date: Wed, 10 Sep 2025 21:15:49 +0000 Subject: [PATCH 3/5] Apply suggestion from @sobolevn Co-authored-by: sobolevn --- .../next/C_API/2025-09-10-17-49-54.gh-issue-138762.1rG6GQ.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/C_API/2025-09-10-17-49-54.gh-issue-138762.1rG6GQ.rst b/Misc/NEWS.d/next/C_API/2025-09-10-17-49-54.gh-issue-138762.1rG6GQ.rst index 8e685aad1af2e9..9fa191a83638df 100644 --- a/Misc/NEWS.d/next/C_API/2025-09-10-17-49-54.gh-issue-138762.1rG6GQ.rst +++ b/Misc/NEWS.d/next/C_API/2025-09-10-17-49-54.gh-issue-138762.1rG6GQ.rst @@ -1 +1 @@ -Move Include/dynamic_annotations.h to be outside extern "C" +Fix linking of the free-threaded build with C++ compiler. From fe05c5da9fed6de487e879c69782883a8ddebacf Mon Sep 17 00:00:00 2001 From: Charlie Lin Date: Fri, 23 Jan 2026 18:48:56 -0500 Subject: [PATCH 4/5] Delete .devcontainer/devcontainer.json --- .devcontainer/devcontainer.json | 83 --------------------------------- 1 file changed, 83 deletions(-) delete mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index fb11c82bb96d9c..00000000000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "image": "ghcr.io/python/devcontainer:latest", - "onCreateCommand": [ - // Install common tooling. - "dnf", - "install", - "-y", - // For umask fix below. - "/usr/bin/setfacl" - ], - "updateContentCommand": { - // Using the shell for `nproc` usage. - "python": "./configure --config-cache --with-pydebug && make -s -j `nproc`", - "docs": [ - "make", - "--directory", - "Doc", - "venv", - "html" - ] - }, - "postCreateCommand": { - // https://github.com/orgs/community/discussions/26026 - "umask fix: workspace": ["sudo", "setfacl", "-bnR", "."], - "umask fix: /tmp": ["sudo", "setfacl", "-bnR", "/tmp"] - }, - "customizations": { - "vscode": { - "extensions": [ - // Highlighting for Parser/Python.asdl. - "brettcannon.zephyr-asdl", - // Highlighting for configure.ac. - "maelvalais.autoconf", - // C auto-complete. - "ms-vscode.cpptools", - // To view HTML build of docs. - "ms-vscode.live-server", - // Python auto-complete. - "ms-python.python" - ], - "settings": { - "C_Cpp.default.compilerPath": "/usr/bin/clang", - "C_Cpp.default.cStandard": "c11", - "C_Cpp.default.defines": [ - "CONFIG_64", - "Py_BUILD_CORE" - ], - "C_Cpp.default.includePath": [ - "${workspaceFolder}/*", - "${workspaceFolder}/Include/**" - ], - // https://github.com/microsoft/vscode-cpptools/issues/10732 - "C_Cpp.errorSquiggles": "disabled", - "editor.insertSpaces": true, - "editor.rulers": [ - 80 - ], - "editor.tabSize": 4, - "editor.trimAutoWhitespace": true, - "files.associations": { - "*.h": "c" - }, - "files.encoding": "utf8", - "files.eol": "\n", - "files.insertFinalNewline": true, - "files.trimTrailingWhitespace": true, - "python.analysis.diagnosticSeverityOverrides": { - // Complains about shadowing the stdlib w/ the stdlib. - "reportShadowedImports": "none", - // Doesn't like _frozen_importlib. - "reportMissingImports": "none" - }, - "python.analysis.extraPaths": [ - "Lib" - ], - "python.defaultInterpreterPath": "./python", - "[restructuredtext]": { - "editor.tabSize": 3 - } - } - } - } -} From 9d0946d5bf0df286ebf79507f35de7bef2c5613a Mon Sep 17 00:00:00 2001 From: Charlie Lin Date: Fri, 23 Jan 2026 18:49:25 -0500 Subject: [PATCH 5/5] Delete .devcontainer/devcontainer.json Remove devcontainer configuration file. --- .devcontainer/devcontainer.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000000000..8b137891791fe9 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1 @@ +