Skip to content

Commit f7065b1

Browse files
author
Erlend E. Aasland
committed
Merge branch 'main' into sqlite-rollback
2 parents 8f7024c + f235dd0 commit f7065b1

File tree

230 files changed

+11315
-11958
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

230 files changed

+11315
-11958
lines changed

‎.gitattributes‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ Modules/clinic/*.h linguist-generated=true
4646
Objects/clinic/*.h linguist-generated=true
4747
PC/clinic/*.h linguist-generated=true
4848
Python/clinic/*.h linguist-generated=true
49-
Python/importlib.h linguist-generated=true
50-
Python/importlib_external.h linguist-generated=true
49+
Python/frozen_modules/*.h linguist-generated=true
5150
Include/internal/pycore_ast.h linguist-generated=true
5251
Python/Python-ast.c linguist-generated=true
5352
Include/opcode.h linguist-generated=true

‎.github/workflows/build.yml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ jobs:
7171
make regen-stdlib-module-names
7272
- name: Check for changes
7373
run: |
74+
git add -u
7475
changes=$(git status --porcelain)
7576
# Check for changes in regenerated files
7677
if ! test -z "$changes"
@@ -83,6 +84,8 @@ jobs:
8384
run: make smelly
8485
- name: Check limited ABI symbols
8586
run: make check-limited-abi
87+
- name: Check Autoconf version 2.69
88+
run: grep "Generated by GNU Autoconf 2.69" configure
8689

8790
build_win32:
8891
name: 'Windows (x86)'
@@ -182,7 +185,7 @@ jobs:
182185
strategy:
183186
fail-fast: false
184187
matrix:
185-
openssl_ver: [1.1.1l, 3.0.0-beta1]
188+
openssl_ver: [1.1.1l, 3.0.0]
186189
env:
187190
OPENSSL_VER: ${{ matrix.openssl_ver }}
188191
MULTISSL_DIR: ${{ github.workspace }}/multissl

‎.gitignore‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Modules/Setup.config
6868
Modules/Setup.local
6969
Modules/config.c
7070
Modules/ld_so_aix
71-
Programs/_freeze_importlib
71+
Programs/_freeze_module
7272
Programs/_testembed
7373
PC/python_nt*.h
7474
PC/pythonnt_rc*.h

‎Doc/c-api/init.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
110110
Suppress error messages when calculating the module search path in
111111
:c:func:`Py_GetPath`.
112112

113-
Private flag used by ``_freeze_importlib`` and ``frozenmain`` programs.
113+
Private flag used by ``_freeze_module`` and ``frozenmain`` programs.
114114

115115
.. c:var:: int Py_HashRandomizationFlag
116116

‎Doc/c-api/intro.rst‎

Lines changed: 56 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -105,45 +105,63 @@ defined closer to where they are useful (e.g. :c:macro:`Py_RETURN_NONE`).
105105
Others of a more general utility are defined here. This is not necessarily a
106106
complete listing.
107107

108-
.. c:macro:: Py_UNREACHABLE()
108+
.. c:macro:: Py_ABS(x)
109109
110-
Use this when you have a code path that cannot be reached by design.
111-
For example, in the ``default:`` clause in a ``switch`` statement for which
112-
all possible values are covered in ``case`` statements. Use this in places
113-
where you might be tempted to put an ``assert(0)`` or ``abort()`` call.
110+
Return the absolute value of ``x``.
114111

115-
In release mode, the macro helps the compiler to optimize the code, and
116-
avoids a warning about unreachable code. For example, the macro is
117-
implemented with ``__builtin_unreachable()`` on GCC in release mode.
112+
.. versionadded:: 3.3
118113

119-
A use for ``Py_UNREACHABLE()`` is following a call a function that
120-
never returns but that is not declared :c:macro:`_Py_NO_RETURN`.
114+
.. c:macro:: Py_CHARMASK(c)
121115
122-
If a code path is very unlikely code but can be reached under exceptional
123-
case, this macro must not be used. For example, under low memory condition
124-
or if a system call returns a value out of the expected range. In this
125-
case, it's better to report the error to the caller. If the error cannot
126-
be reported to caller, :c:func:`Py_FatalError` can be used.
116+
Argument must be a character or an integer in the range [-128, 127] or [0,
117+
255]. This macro returns ``c`` cast to an ``unsigned char``.
127118

128-
.. versionadded:: 3.7
119+
.. c:macro:: Py_DEPRECATED(version)
129120
130-
.. c:macro:: Py_ABS(x)
121+
Use this for deprecated declarations. The macro must be placed before the
122+
symbol name.
131123

132-
Return the absolute value of ``x``.
124+
Example::
125+
126+
Py_DEPRECATED(3.8) PyAPI_FUNC(int) Py_OldFunction(void);
127+
128+
.. versionchanged:: 3.8
129+
MSVC support was added.
130+
131+
.. c:macro:: Py_GETENV(s)
132+
133+
Like ``getenv(s)``, but returns ``NULL`` if :option:`-E` was passed on the
134+
command line (i.e. if ``Py_IgnoreEnvironmentFlag`` is set).
135+
136+
.. c:macro:: Py_MAX(x, y)
137+
138+
Return the maximum value between ``x`` and ``y``.
133139

134140
.. versionadded:: 3.3
135141

142+
.. c:macro:: Py_MEMBER_SIZE(type, member)
143+
144+
Return the size of a structure (``type``) ``member`` in bytes.
145+
146+
.. versionadded:: 3.6
147+
136148
.. c:macro:: Py_MIN(x, y)
137149
138150
Return the minimum value between ``x`` and ``y``.
139151

140152
.. versionadded:: 3.3
141153

142-
.. c:macro:: Py_MAX(x, y)
154+
.. c:macro:: Py_NO_INLINE
143155
144-
Return the maximum value between ``x`` and ``y``.
156+
Disable inlining on a function. For example, it reduces the C stack
157+
consumption: useful on LTO+PGO builds which heavily inline code (see
158+
:issue:`33720`).
145159

146-
.. versionadded:: 3.3
160+
Usage::
161+
162+
Py_NO_INLINE static int random(void) { return 4; }
163+
164+
.. versionadded:: 3.11
147165

148166
.. c:macro:: Py_STRINGIFY(x)
149167
@@ -152,21 +170,27 @@ complete listing.
152170

153171
.. versionadded:: 3.4
154172

155-
.. c:macro:: Py_MEMBER_SIZE(type, member)
156-
157-
Return the size of a structure (``type``) ``member`` in bytes.
173+
.. c:macro:: Py_UNREACHABLE()
158174
159-
.. versionadded:: 3.6
175+
Use this when you have a code path that cannot be reached by design.
176+
For example, in the ``default:`` clause in a ``switch`` statement for which
177+
all possible values are covered in ``case`` statements. Use this in places
178+
where you might be tempted to put an ``assert(0)`` or ``abort()`` call.
160179

161-
.. c:macro:: Py_CHARMASK(c)
180+
In release mode, the macro helps the compiler to optimize the code, and
181+
avoids a warning about unreachable code. For example, the macro is
182+
implemented with ``__builtin_unreachable()`` on GCC in release mode.
162183

163-
Argument must be a character or an integer in the range [-128, 127] or [0,
164-
255]. This macro returns ``c`` cast to an ``unsigned char``.
184+
A use for ``Py_UNREACHABLE()`` is following a call a function that
185+
never returns but that is not declared :c:macro:`_Py_NO_RETURN`.
165186

166-
.. c:macro:: Py_GETENV(s)
187+
If a code path is very unlikely code but can be reached under exceptional
188+
case, this macro must not be used. For example, under low memory condition
189+
or if a system call returns a value out of the expected range. In this
190+
case, it's better to report the error to the caller. If the error cannot
191+
be reported to caller, :c:func:`Py_FatalError` can be used.
167192

168-
Like ``getenv(s)``, but returns ``NULL`` if :option:`-E` was passed on the
169-
command line (i.e. if ``Py_IgnoreEnvironmentFlag`` is set).
193+
.. versionadded:: 3.7
170194

171195
.. c:macro:: Py_UNUSED(arg)
172196
@@ -175,18 +199,6 @@ complete listing.
175199

176200
.. versionadded:: 3.4
177201

178-
.. c:macro:: Py_DEPRECATED(version)
179-
180-
Use this for deprecated declarations. The macro must be placed before the
181-
symbol name.
182-
183-
Example::
184-
185-
Py_DEPRECATED(3.8) PyAPI_FUNC(int) Py_OldFunction(void);
186-
187-
.. versionchanged:: 3.8
188-
MSVC support was added.
189-
190202
.. c:macro:: PyDoc_STRVAR(name, str)
191203
192204
Creates a variable with name ``name`` that can be used in docstrings.
@@ -221,6 +233,7 @@ complete listing.
221233
{NULL, NULL}
222234
};
223235

236+
224237
.. _api-objects:
225238

226239
Objects, Types and Reference Counts

‎Doc/c-api/iter.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ There are two functions specifically for working with iterators.
1212
Return non-zero if the object *o* supports the iterator protocol, and ``0``
1313
otherwise. This function always succeeds.
1414
15-
.. c:function:: int PyAiter_Check(PyObject *o)
15+
.. c:function:: int PyAIter_Check(PyObject *o)
1616
1717
Returns non-zero if the object 'obj' provides :class:`AsyncIterator`
1818
protocols, and ``0`` otherwise. This function always succeeds.

‎Doc/c-api/object.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ Object Protocol
358358
iterated.
359359
360360
361-
.. c:function:: PyObject* PyObject_GetAiter(PyObject *o)
361+
.. c:function:: PyObject* PyObject_GetAIter(PyObject *o)
362362
363363
This is the equivalent to the Python expression ``aiter(o)``. Takes an
364364
:class:`AsyncIterable` object and returns an :class:`AsyncIterator` for it.

‎Doc/c-api/structures.rst‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,10 @@ the definition of all other Python objects.
9999
100100
Return a :term:`borrowed reference`.
101101
102-
The :c:func:`Py_SET_TYPE` function must be used to set an object type.
102+
Use the :c:func:`Py_SET_TYPE` function to set an object type.
103+
104+
.. versionchanged:: 3.11
105+
:c:func:`Py_TYPE()` is changed to an inline static function.
103106
104107
105108
.. c:function:: int Py_IS_TYPE(PyObject *o, PyTypeObject *type)
@@ -121,9 +124,10 @@ the definition of all other Python objects.
121124
122125
Get the reference count of the Python object *o*.
123126
127+
Use the :c:func:`Py_SET_REFCNT()` function to set an object reference count.
128+
124129
.. versionchanged:: 3.10
125130
:c:func:`Py_REFCNT()` is changed to the inline static function.
126-
Use :c:func:`Py_SET_REFCNT()` to set an object reference count.
127131
128132
129133
.. c:function:: void Py_SET_REFCNT(PyObject *o, Py_ssize_t refcnt)
@@ -137,7 +141,10 @@ the definition of all other Python objects.
137141
138142
Get the size of the Python object *o*.
139143
140-
The :c:func:`Py_SET_SIZE` function must be used to set an object size.
144+
Use the :c:func:`Py_SET_SIZE` function to set an object size.
145+
146+
.. versionchanged:: 3.11
147+
:c:func:`Py_SIZE()` is changed to an inline static function.
141148
142149
143150
.. c:function:: void Py_SET_SIZE(PyVarObject *o, Py_ssize_t size)

‎Doc/data/refcounts.dat‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,8 +1073,8 @@ PyInterpreterState_New:PyInterpreterState*:::
10731073
PyIter_Check:int:::
10741074
PyIter_Check:PyObject*:o:0:
10751075

1076-
PyAiter_Check:int:::
1077-
PyAiter_Check:PyObject*:o:0:
1076+
PyAIter_Check:int:::
1077+
PyAIter_Check:PyObject*:o:0:
10781078

10791079
PyIter_Next:PyObject*::+1:
10801080
PyIter_Next:PyObject*:o:0:
@@ -1700,8 +1700,8 @@ PyObject_GetItem:PyObject*:key:0:
17001700
PyObject_GetIter:PyObject*::+1:
17011701
PyObject_GetIter:PyObject*:o:0:
17021702

1703-
PyObject_GetAiter:PyObject*::+1:
1704-
PyObject_GetAiter:PyObject*:o:0:
1703+
PyObject_GetAIter:PyObject*::+1:
1704+
PyObject_GetAIter:PyObject*:o:0:
17051705

17061706
PyObject_HasAttr:int:::
17071707
PyObject_HasAttr:PyObject*:o:0:

‎Doc/data/stable_abi.dat‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
role,name,added,ifdef_note
2-
function,PyAiter_Check,3.10,
2+
function,PyAIter_Check,3.10,
33
function,PyArg_Parse,3.2,
44
function,PyArg_ParseTuple,3.2,
55
function,PyArg_ParseTupleAndKeywords,3.2,
@@ -491,7 +491,7 @@ function,PyObject_GenericGetAttr,3.2,
491491
function,PyObject_GenericGetDict,3.10,
492492
function,PyObject_GenericSetAttr,3.2,
493493
function,PyObject_GenericSetDict,3.7,
494-
function,PyObject_GetAiter,3.10,
494+
function,PyObject_GetAIter,3.10,
495495
function,PyObject_GetAttr,3.2,
496496
function,PyObject_GetAttrString,3.2,
497497
function,PyObject_GetItem,3.2,

0 commit comments

Comments
 (0)