Skip to content

gh-110968: Py_MOD_PER_INTERPRETER_GIL_SUPPORTED was added to 3.12 #111584

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Include/moduleobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ struct PyModuleDef_Slot {
#endif /* New in 3.5 */

/* for Py_mod_multiple_interpreters: */
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030d0000
#define Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED ((void *)0)
#define Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTED ((void *)1)
#define Py_MOD_PER_INTERPRETER_GIL_SUPPORTED ((void *)2)
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030c0000
# define Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED ((void *)0)
# define Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTED ((void *)1)
# define Py_MOD_PER_INTERPRETER_GIL_SUPPORTED ((void *)2)
#endif

struct PyModuleDef {
Expand Down
4 changes: 2 additions & 2 deletions Modules/_ctypes/_ctypes_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#endif

#ifndef Py_NOGIL
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
#define Py_LIMITED_API 0x030d0000
// Need limited C API version 3.12 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
#define Py_LIMITED_API 0x030c0000
#endif

// gh-85283: On Windows, Py_LIMITED_API requires Py_BUILD_CORE to not attempt
Expand Down
4 changes: 2 additions & 2 deletions Modules/_multiprocessing/posixshmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ posixshmem - A Python extension that provides shm_open() and shm_unlink()
#include "pyconfig.h" // Py_NOGIL

#ifndef Py_NOGIL
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
#define Py_LIMITED_API 0x030d0000
// Need limited C API version 3.12 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
#define Py_LIMITED_API 0x030c0000
#endif

#include <Python.h>
Expand Down
4 changes: 2 additions & 2 deletions Modules/_scproxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#endif

#ifndef Py_NOGIL
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
#define Py_LIMITED_API 0x030d0000
// Need limited C API version 3.12 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
#define Py_LIMITED_API 0x030c0000
#endif

#include <Python.h>
Expand Down
2 changes: 1 addition & 1 deletion Modules/_stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#include "pyconfig.h" // Py_NOGIL
#endif

// Need limited C API version 3.13 for PyModule_Add() on Windows
#ifndef Py_NOGIL
// Need limited C API version 3.13 for PyModule_Add() on Windows
#define Py_LIMITED_API 0x030d0000
#endif

Expand Down
2 changes: 1 addition & 1 deletion Modules/_testclinic_limited.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#include "pyconfig.h" // Py_NOGIL
#endif

// For now, only limited C API 3.13 is supported
#ifndef Py_NOGIL
// For now, only limited C API 3.13 is supported
#define Py_LIMITED_API 0x030d0000
#endif

Expand Down
4 changes: 2 additions & 2 deletions Modules/_uuidmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#endif

#ifndef Py_NOGIL
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
#define Py_LIMITED_API 0x030d0000
// Need limited C API version 3.12 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
#define Py_LIMITED_API 0x030c0000
#endif

#include "Python.h"
Expand Down
4 changes: 2 additions & 2 deletions Modules/errnomodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#endif

#ifndef Py_NOGIL
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
#define Py_LIMITED_API 0x030d0000
// Need limited C API version 3.12 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
#define Py_LIMITED_API 0x030c0000
#endif

#include "Python.h"
Expand Down
4 changes: 2 additions & 2 deletions Modules/md5module.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
#endif

#ifndef Py_NOGIL
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
#define Py_LIMITED_API 0x030d0000
// Need limited C API version 3.12 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
#define Py_LIMITED_API 0x030c0000
#endif

#include "Python.h"
Expand Down
2 changes: 1 addition & 1 deletion Modules/resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#endif

#ifndef Py_NOGIL
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
// Need limited C API version 3.13 for PySys_Audit()
#define Py_LIMITED_API 0x030d0000
#endif

Expand Down
4 changes: 2 additions & 2 deletions Modules/xxlimited.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@
#endif

#ifndef Py_NOGIL
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
#define Py_LIMITED_API 0x030d0000
// Need limited C API version 3.12 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
#define Py_LIMITED_API 0x030c0000
#endif

#include "Python.h"
Expand Down
4 changes: 2 additions & 2 deletions PC/winsound.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
*/

#ifndef Py_NOGIL
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
#define Py_LIMITED_API 0x030d0000
// Need limited C API version 3.12 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
#define Py_LIMITED_API 0x030c0000
#endif

#include <Python.h>
Expand Down