Skip to content

Commit

Permalink
Merge branch 'main' into ctypes-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
erlend-aasland authored Aug 6, 2023
2 parents d567fe2 + 71a7c96 commit cd35025
Show file tree
Hide file tree
Showing 149 changed files with 5,214 additions and 2,676 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,11 @@ Doc/library/token-list.inc generated
Include/internal/pycore_ast.h generated
Include/internal/pycore_ast_state.h generated
Include/internal/pycore_opcode.h generated
Include/internal/pycore_opcode_metadata.h generated
Include/internal/pycore_*_generated.h generated
Include/opcode.h generated
Include/token.h generated
Lib/_opcode_metadata.py generated
Lib/keyword.py generated
Lib/test/levenshtein_examples.json generated
Lib/test/test_stable_abi_ctypes.py generated
Expand Down
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ Python/traceback.c @iritkatriel

# Import (including importlib).
**/*import* @brettcannon @ericsnowcurrently @ncoghlan @warsaw
/Python/import.c @kumaraditya303
**/*importlib/resources/* @jaraco @warsaw @FFY00
**/importlib/metadata/* @jaraco @warsaw

Expand Down
6 changes: 2 additions & 4 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ labels: "type-bug"

<!-- Bugs in third-party projects (e.g. `requests`) do not belong in the CPython issue tracker -->

- [ ] I am confident this is a bug in CPython,
not a bug in a third-party project
- [ ] I have searched the CPython issue tracker,
and am confident this bug has not been reported before
- [ ] I am confident this is a bug in CPython, not a bug in a third-party project
- [ ] I have searched the CPython issue tracker, and am confident this bug has not been reported before

## A clear and concise description of the bug

Expand Down
1 change: 1 addition & 0 deletions Doc/c-api/init.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1287,6 +1287,7 @@ function. You can create and destroy them using the following functions:
in any thread where the sub-interpreter is currently active.
Otherwise only multi-phase init extension modules
(see :pep:`489`) may be imported.
(Also see :c:macro:`Py_mod_multiple_interpreters`.)
This must be ``1`` (non-zero) if
:c:member:`~PyInterpreterConfig.use_main_obmalloc` is ``0``.
Expand Down
6 changes: 6 additions & 0 deletions Doc/c-api/memory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,10 @@ Customize Memory Allocators
thread-safe: the :term:`GIL <global interpreter lock>` is not held when the
allocator is called.
For the remaining domains, the allocator must also be thread-safe:
the allocator may be called in different interpreters that do not
share a ``GIL``.
If the new allocator is not a hook (does not call the previous allocator),
the :c:func:`PyMem_SetupDebugHooks` function must be called to reinstall the
debug hooks on top on the new allocator.
Expand All @@ -500,6 +504,8 @@ Customize Memory Allocators
**must** wrap the existing allocator. Substituting the current
allocator for some other arbitrary one is **not supported**.
.. versionchanged:: 3.12
All allocators must be thread-safe.
.. c:function:: void PyMem_SetupDebugHooks(void)
Expand Down
31 changes: 31 additions & 0 deletions Doc/c-api/module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,37 @@ The available slot types are:
If multiple ``Py_mod_exec`` slots are specified, they are processed in the
order they appear in the *m_slots* array.
.. c:macro:: Py_mod_multiple_interpreters
Specifies one of the following values:
.. c:macro:: Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED
The module does not support being imported in subinterpreters.
.. c:macro:: Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTED
The module supports being imported in subinterpreters,
but only when they share the main interpreter's GIL.
(See :ref:`isolating-extensions-howto`.)
.. c:macro:: Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
The module supports being imported in subinterpreters,
even when they have their own GIL.
(See :ref:`isolating-extensions-howto`.)
This slot determines whether or not importing this module
in a subinterpreter will fail.
Multiple ``Py_mod_multiple_interpreters`` slots may not be specified
in one module definition.
If ``Py_mod_multiple_interpreters`` is not specified, the import
machinery defaults to ``Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED``.
.. versionadded:: 3.12
See :PEP:`489` for more details on multi-phase initialization.
Low-level module creation functions
Expand Down
2 changes: 2 additions & 0 deletions Doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@
('c:type', 'uintptr_t'),
('c:type', 'va_list'),
('c:type', 'wchar_t'),
('c:type', '__int64'),
('c:type', 'unsigned __int64'),
# Standard C structures
('c:struct', 'in6_addr'),
('c:struct', 'in_addr'),
Expand Down
Loading

0 comments on commit cd35025

Please sign in to comment.