gh-133779: Revert Windows generation of pyconfig.h and go back to a static header. (GH-133966)

Extension builders must specify Py_GIL_DISABLED if they want to link to the free-threaded builds.
This was usually the case already, but this change guarantees it in all circumstances.
This commit is contained in:
Steve Dower 2025-05-19 11:35:22 +01:00 committed by GitHub
parent d55e11b804
commit 986c367028
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 63 additions and 78 deletions

View file

@ -59,6 +59,14 @@
# include <intrin.h> // __readgsqword()
#endif
// Suppress known warnings in Python header files.
#if defined(_MSC_VER)
// Warning that alignas behaviour has changed. Doesn't affect us, because we
// never relied on the old behaviour.
#pragma warning(push)
#pragma warning(disable: 5274)
#endif
// Include Python header files
#include "pyport.h"
#include "pymacro.h"
@ -138,4 +146,9 @@
#include "cpython/pyfpe.h"
#include "cpython/tracemalloc.h"
// Restore warning filter
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif /* !Py_PYTHON_H */