Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-134160: Use multi-phase init in documentation examples#134296

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
neonene wants to merge20 commits intopython:main
base:main
Choose a base branch
Loading
fromneonene:multi
Open
Show file tree
Hide file tree
Changes from1 commit
Commits
Show all changes
20 commits
Select commitHold shift + click to select a range
8d8b366
Update docs
neoneneMay 19, 2025
88c5f3f
Don't change an unrelated example
neoneneMay 20, 2025
a4ade5c
Apply suggestions from code review
neoneneMay 21, 2025
d6c42e2
ditto
neoneneMay 21, 2025
97eae13
Suggested module names
neoneneMay 21, 2025
8ae6bae
Avoid modernization
neoneneMay 21, 2025
bc78288
typo
neoneneMay 21, 2025
c3ab022
Correction: "error"
neoneneMay 21, 2025
d65303c
Rephrase warning
neoneneMay 21, 2025
aec6781
keywdarg_module
neoneneMay 21, 2025
7dfd5ad
Update Doc/extending/extending.rst
neoneneMay 22, 2025
f7c72dd
Indicate xxlimited
neoneneMay 22, 2025
c84638c
Add seealso to index
neoneneMay 22, 2025
4e59e88
Update Doc/extending/embedding.rst
neoneneMay 22, 2025
d68e3e3
ditto (for copy-paste)
neoneneMay 22, 2025
f6465bd
Shrink slots
neoneneMay 22, 2025
1a65816
Remove module states
neoneneMay 22, 2025
a83e266
Correction: "SpamError"
neoneneMay 22, 2025
2d10958
Add a Py_mod_multiple_interpreters slot
neoneneMay 22, 2025
a28e67c
Cancel the prvious addition as needless
neoneneMay 22, 2025
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
PrevPrevious commit
NextNext commit
ditto (for copy-paste)
  • Loading branch information
@neonene
neonene committedMay 22, 2025
commitd68e3e33cd0681f46422cde28d75889aa04555cf
18 changes: 18 additions & 0 deletionsDoc/extending/extending.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -259,8 +259,14 @@ with an exception object::

static PyModuleDef_Slot spam_module_slots[] = {
{Py_mod_exec, spam_module_exec},
#ifdef Py_mod_multiple_interpreters
// signal that this module can be imported in isolated subinterpreters
{Py_mod_multiple_interpreters, Py_MOD_PER_INTERPRETER_GIL_SUPPORTED},
#endif
#ifdef Py_mod_gil
// signal that this module supports running without an active GIL
{Py_mod_gil, Py_MOD_GIL_NOT_USED},
#endif
{0, NULL}
};

Expand DownExpand Up@@ -829,8 +835,12 @@ Philbrick (philbrick@hks.com)::
};

static PyModuleDef_Slot keywdarg_slots[] = {
#ifdef Py_mod_multiple_interpreters
{Py_mod_multiple_interpreters, Py_MOD_PER_INTERPRETER_GIL_SUPPORTED},
#endif
#ifdef Py_mod_gil
{Py_mod_gil, Py_MOD_GIL_NOT_USED},
#endif
{0, NULL}
};

Expand DownExpand Up@@ -1333,8 +1343,12 @@ function must take care of initializing the C API pointer array::

static PyModuleDef_Slot spam_module_slots[] = {
{Py_mod_exec, spam_module_exec},
#ifdef Py_mod_multiple_interpreters
{Py_mod_multiple_interpreters, Py_MOD_PER_INTERPRETER_GIL_SUPPORTED},
#endif
#ifdef Py_mod_gil
{Py_mod_gil, Py_MOD_GIL_NOT_USED},
#endif
{0, NULL}
};

Expand DownExpand Up@@ -1412,8 +1426,12 @@ like this::

static PyModuleDef_Slot client_module_slots[] = {
{Py_mod_exec, client_module_exec},
#ifdef Py_mod_multiple_interpreters
{Py_mod_multiple_interpreters, Py_MOD_PER_INTERPRETER_GIL_SUPPORTED},
#endif
#ifdef Py_mod_gil
{Py_mod_gil, Py_MOD_GIL_NOT_USED},
#endif
{0, NULL}
};

Expand Down
4 changes: 4 additions & 0 deletionsDoc/includes/newtypes/custom.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -31,9 +31,13 @@ custom_module_exec(PyObject *mod)

static PyModuleDef_Slot custom_module_slots[] = {
{Py_mod_exec, custom_module_exec},
#ifdef Py_mod_multiple_interpreters
// Py_MOD_PER_INTERPRETER_GIL_SUPPORTED requires heaptypes
{Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED},
#endif
#ifdef Py_mod_gil
{Py_mod_gil, Py_MOD_GIL_NOT_USED},
#endif
{0, NULL}
};

Expand Down
4 changes: 4 additions & 0 deletionsDoc/includes/newtypes/custom2.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -121,9 +121,13 @@ custom_module_exec(PyObject *mod)

static PyModuleDef_Slot custom_module_slots[] = {
{Py_mod_exec, custom_module_exec},
#ifdef Py_mod_multiple_interpreters
// Py_MOD_PER_INTERPRETER_GIL_SUPPORTED requires heaptypes
{Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED},
#endif
#ifdef Py_mod_gil
{Py_mod_gil, Py_MOD_GIL_NOT_USED},
#endif
{0, NULL}
};

Expand Down
4 changes: 4 additions & 0 deletionsDoc/includes/newtypes/custom3.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -166,9 +166,13 @@ custom_module_exec(PyObject *mod)

static PyModuleDef_Slot custom_module_slots[] = {
{Py_mod_exec, custom_module_exec},
#ifdef Py_mod_multiple_interpreters
// Py_MOD_PER_INTERPRETER_GIL_SUPPORTED requires heaptypes
{Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED},
#endif
#ifdef Py_mod_gil
{Py_mod_gil, Py_MOD_GIL_NOT_USED},
#endif
{0, NULL}
};

Expand Down
4 changes: 4 additions & 0 deletionsDoc/includes/newtypes/custom4.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -185,9 +185,13 @@ custom_module_exec(PyObject *mod)

static PyModuleDef_Slot custom_module_slots[] = {
{Py_mod_exec, custom_module_exec},
#ifdef Py_mod_multiple_interpreters
// Py_MOD_PER_INTERPRETER_GIL_SUPPORTED requires heaptypes
{Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED},
#endif
#ifdef Py_mod_gil
{Py_mod_gil, Py_MOD_GIL_NOT_USED},
#endif
{0, NULL}
};

Expand Down
4 changes: 4 additions & 0 deletionsDoc/includes/newtypes/sublist.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -57,9 +57,13 @@ sublist_module_exec(PyObject *mod)

static PyModuleDef_Slot sublist_module_slots[] = {
{Py_mod_exec, sublist_module_exec},
#ifdef Py_mod_multiple_interpreters
// Py_MOD_PER_INTERPRETER_GIL_SUPPORTED requires heaptypes
{Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED},
#endif
#ifdef Py_mod_gil
{Py_mod_gil, Py_MOD_GIL_NOT_USED},
#endif
{0, NULL}
};

Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp