Skip to content

Commit

Permalink
Merge branch '3.12' into backport-b3687ad-3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
Yhg1s authored Dec 2, 2024
2 parents e51cc5b + 9295a1d commit c630bf3
Show file tree
Hide file tree
Showing 76 changed files with 1,475 additions and 578 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
steps:
- name: Install Git
run: |
apt install git -yq
apt update && apt install git -yq
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/checkout@v4
with:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/reusable-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ jobs:
path: config.cache
key: ${{ github.job }}-${{ inputs.os }}-${{ env.IMAGE_VERSION }}-${{ inputs.config_hash }}
- name: Install Homebrew dependencies
run: brew install pkg-config [email protected] xz gdbm tcl-tk
run: |
brew install pkg-config [email protected] xz gdbm tcl-tk@8
# Because alternate versions are not symlinked into place by default:
brew link tcl-tk@8
- name: Configure CPython
run: |
GDBM_CFLAGS="-I$(brew --prefix gdbm)/include" \
Expand Down
4 changes: 2 additions & 2 deletions Doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ pydoc-topics: build

.PHONY: gettext
gettext: BUILDER = gettext
gettext: SPHINXOPTS += -d build/doctrees-gettext
gettext: override SPHINXOPTS := -d build/doctrees-gettext $(SPHINXOPTS)
gettext: build

.PHONY: htmlview
Expand Down Expand Up @@ -294,7 +294,7 @@ check: _ensure-pre-commit

.PHONY: serve
serve:
@echo "The serve target was removed, use htmlview instead (see bpo-36329)"
@echo "The serve target was removed, use htmllive instead (see gh-80510)"

# Targets for daily automated doc build
# By default, Sphinx only rebuilds pages where the page content has changed.
Expand Down
6 changes: 5 additions & 1 deletion Doc/c-api/init.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1644,7 +1644,11 @@ function. You can create and destroy them using the following functions:
.check_multi_interp_extensions = 1,
.gil = PyInterpreterConfig_OWN_GIL,
};
PyThreadState *tstate = Py_NewInterpreterFromConfig(&config);
PyThreadState *tstate = NULL;
PyStatus status = Py_NewInterpreterFromConfig(&tstate, &config);
if (PyStatus_Exception(status)) {
Py_ExitStatusException(status);
}
Note that the config is used only briefly and does not get modified.
During initialization the config's values are converted into various
Expand Down
39 changes: 19 additions & 20 deletions Doc/c-api/type.rst
Original file line number Diff line number Diff line change
Expand Up @@ -465,19 +465,19 @@ The following functions and structs are used to create
The following “offset” fields cannot be set using :c:type:`PyType_Slot`:
* :c:member:`~PyTypeObject.tp_weaklistoffset`
(use :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` instead if possible)
* :c:member:`~PyTypeObject.tp_dictoffset`
(use :c:macro:`Py_TPFLAGS_MANAGED_DICT` instead if possible)
* :c:member:`~PyTypeObject.tp_vectorcall_offset`
(use ``"__vectorcalloffset__"`` in
:ref:`PyMemberDef <pymemberdef-offsets>`)
If it is not possible to switch to a ``MANAGED`` flag (for example,
for vectorcall or to support Python older than 3.12), specify the
offset in :c:member:`Py_tp_members <PyTypeObject.tp_members>`.
See :ref:`PyMemberDef documentation <pymemberdef-offsets>`
for details.
* :c:member:`~PyTypeObject.tp_weaklistoffset`
(use :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` instead if possible)
* :c:member:`~PyTypeObject.tp_dictoffset`
(use :c:macro:`Py_TPFLAGS_MANAGED_DICT` instead if possible)
* :c:member:`~PyTypeObject.tp_vectorcall_offset`
(use ``"__vectorcalloffset__"`` in
:ref:`PyMemberDef <pymemberdef-offsets>`)
If it is not possible to switch to a ``MANAGED`` flag (for example,
for vectorcall or to support Python older than 3.12), specify the
offset in :c:member:`Py_tp_members <PyTypeObject.tp_members>`.
See :ref:`PyMemberDef documentation <pymemberdef-offsets>`
for details.
The following fields cannot be set at all when creating a heap type:
Expand All @@ -497,14 +497,13 @@ The following functions and structs are used to create
To avoid issues, use the *bases* argument of
:c:func:`PyType_FromSpecWithBases` instead.
.. versionchanged:: 3.9
.. versionchanged:: 3.9
Slots in :c:type:`PyBufferProcs` may be set in the unlimited API.
Slots in :c:type:`PyBufferProcs` may be set in the unlimited API.
.. versionchanged:: 3.11
:c:member:`~PyBufferProcs.bf_getbuffer` and
:c:member:`~PyBufferProcs.bf_releasebuffer` are now available
under the :ref:`limited API <limited-c-api>`.
.. versionchanged:: 3.11
:c:member:`~PyBufferProcs.bf_getbuffer` and
:c:member:`~PyBufferProcs.bf_releasebuffer` are now available
under the :ref:`limited API <limited-c-api>`.
.. c:member:: void *pfunc
Expand Down
40 changes: 21 additions & 19 deletions Doc/data/refcounts.dat
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ PyCapsule_IsValid:const char*:name::
PyCapsule_New:PyObject*::+1:
PyCapsule_New:void*:pointer::
PyCapsule_New:const char *:name::
PyCapsule_New::void (* destructor)(PyObject* )::
PyCapsule_New:void (*)(PyObject *):destructor::

PyCapsule_SetContext:int:::
PyCapsule_SetContext:PyObject*:self:0:
Expand Down Expand Up @@ -349,11 +349,11 @@ PyComplex_CheckExact:int:::
PyComplex_CheckExact:PyObject*:p:0:

PyComplex_FromCComplex:PyObject*::+1:
PyComplex_FromCComplex::Py_complex v::
PyComplex_FromCComplex:Py_complex:v::

PyComplex_FromDoubles:PyObject*::+1:
PyComplex_FromDoubles::double real::
PyComplex_FromDoubles::double imag::
PyComplex_FromDoubles:double:real::
PyComplex_FromDoubles:double:imag::

PyComplex_ImagAsDouble:double:::
PyComplex_ImagAsDouble:PyObject*:op:0:
Expand Down Expand Up @@ -622,7 +622,9 @@ PyErr_GetExcInfo:PyObject**:pvalue:+1:
PyErr_GetExcInfo:PyObject**:ptraceback:+1:

PyErr_GetRaisedException:PyObject*::+1:
PyErr_SetRaisedException::::

PyErr_SetRaisedException:void:::
PyErr_SetRaisedException:PyObject *:exc:0:stolen

PyErr_GivenExceptionMatches:int:::
PyErr_GivenExceptionMatches:PyObject*:given:0:
Expand All @@ -642,9 +644,9 @@ PyErr_NewExceptionWithDoc:PyObject*:dict:0:
PyErr_NoMemory:PyObject*::null:

PyErr_NormalizeException:void:::
PyErr_NormalizeException:PyObject**:exc::???
PyErr_NormalizeException:PyObject**:val::???
PyErr_NormalizeException:PyObject**:tb::???
PyErr_NormalizeException:PyObject**:exc:+1:???
PyErr_NormalizeException:PyObject**:val:+1:???
PyErr_NormalizeException:PyObject**:tb:+1:???

PyErr_Occurred:PyObject*::0:

Expand Down Expand Up @@ -1268,7 +1270,7 @@ PyMapping_GetItemString:const char*:key::

PyMapping_HasKey:int:::
PyMapping_HasKey:PyObject*:o:0:
PyMapping_HasKey:PyObject*:key::
PyMapping_HasKey:PyObject*:key:0:

PyMapping_HasKeyString:int:::
PyMapping_HasKeyString:PyObject*:o:0:
Expand Down Expand Up @@ -1428,7 +1430,7 @@ PyModule_GetState:void*:::
PyModule_GetState:PyObject*:module:0:

PyModule_New:PyObject*::+1:
PyModule_New::char* name::
PyModule_New:char*:name::

PyModule_NewObject:PyObject*::+1:
PyModule_NewObject:PyObject*:name:+1:
Expand All @@ -1438,7 +1440,7 @@ PyModule_SetDocString:PyObject*:module:0:
PyModule_SetDocString:const char*:docstring::

PyModuleDef_Init:PyObject*::0:
PyModuleDef_Init:PyModuleDef*:def:0:
PyModuleDef_Init:PyModuleDef*:def::

PyNumber_Absolute:PyObject*::+1:
PyNumber_Absolute:PyObject*:o:0:
Expand Down Expand Up @@ -1950,10 +1952,10 @@ PyRun_StringFlags:PyObject*:locals:0:
PyRun_StringFlags:PyCompilerFlags*:flags::

PySeqIter_Check:int:::
PySeqIter_Check::op::
PySeqIter_Check:PyObject *:op:0:

PySeqIter_New:PyObject*::+1:
PySeqIter_New:PyObject*:seq::
PySeqIter_New:PyObject*:seq:0:

PySequence_Check:int:::
PySequence_Check:PyObject*:o:0:
Expand Down Expand Up @@ -2393,7 +2395,7 @@ PyUnicode_GET_DATA_SIZE:PyObject*:o:0:
PyUnicode_KIND:int:::
PyUnicode_KIND:PyObject*:o:0:

PyUnicode_MAX_CHAR_VALUE::::
PyUnicode_MAX_CHAR_VALUE:Py_UCS4:::
PyUnicode_MAX_CHAR_VALUE:PyObject*:o:0:

PyUnicode_AS_UNICODE:Py_UNICODE*:::
Expand Down Expand Up @@ -2480,7 +2482,7 @@ PyUnicode_FromWideChar:const wchar_t*:w::
PyUnicode_FromWideChar:Py_ssize_t:size::

PyUnicode_AsWideChar:Py_ssize_t:::
PyUnicode_AsWideChar:PyObject*:*unicode:0:
PyUnicode_AsWideChar:PyObject*:unicode:0:
PyUnicode_AsWideChar:wchar_t*:w::
PyUnicode_AsWideChar:Py_ssize_t:size::

Expand Down Expand Up @@ -2533,7 +2535,7 @@ PyUnicode_AsUTF8String:PyObject*:unicode:0:

PyUnicode_AsUTF8AndSize:const char*:::
PyUnicode_AsUTF8AndSize:PyObject*:unicode:0:
PyUnicode_AsUTF8AndSize:Py_ssize_t*:size:0:
PyUnicode_AsUTF8AndSize:Py_ssize_t*:size::

PyUnicode_AsUTF8:const char*:::
PyUnicode_AsUTF8:PyObject*:unicode:0:
Expand Down Expand Up @@ -2856,13 +2858,13 @@ PyUnicodeDecodeError_SetStart:PyObject*:exc:0:
PyUnicodeDecodeError_SetStart:Py_ssize_t:start::

PyWeakref_Check:int:::
PyWeakref_Check:PyObject*:ob::
PyWeakref_Check:PyObject*:ob:0:

PyWeakref_CheckProxy:int:::
PyWeakref_CheckProxy:PyObject*:ob::
PyWeakref_CheckProxy:PyObject*:ob:0:

PyWeakref_CheckRef:int:::
PyWeakref_CheckRef:PyObject*:ob::
PyWeakref_CheckRef:PyObject*:ob:0:

PyWeakref_GET_OBJECT:PyObject*::0:
PyWeakref_GET_OBJECT:PyObject*:ref:0:
Expand Down
Loading

0 comments on commit c630bf3

Please sign in to comment.