diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index fb11c82bb96d9c..8b137891791fe9 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,83 +1 @@ -{ - "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 - } - } - } - } -} + 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 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..9fa191a83638df --- /dev/null +++ b/Misc/NEWS.d/next/C_API/2025-09-10-17-49-54.gh-issue-138762.1rG6GQ.rst @@ -0,0 +1 @@ +Fix linking of the free-threaded build with C++ compiler.