Skip to content

Commit d00b16a

Browse files
Merge branch 'main' into sergey-miryanov-139389-donot-track-immutable-tuples
2 parents 567105f + 9a87ce8 commit d00b16a

File tree

849 files changed

+11944
-3395
lines changed

Some content is hidden

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

849 files changed

+11944
-3395
lines changed

.github/workflows/reusable-macos.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ jobs:
4343
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ inputs.config_hash }}
4444
- name: Install Homebrew dependencies
4545
run: |
46-
brew install pkg-config [email protected] xz gdbm tcl-tk@8 make
46+
brew install pkg-config [email protected] xz gdbm tcl-tk@9 make
4747
# Because alternate versions are not symlinked into place by default:
48-
brew link --overwrite tcl-tk@8
48+
brew link --overwrite tcl-tk@9
4949
- name: Configure CPython
5050
run: |
5151
MACOSX_DEPLOYMENT_TARGET=10.15 \

Android/testbed/app/build.gradle.kts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ for ((i, prefix) in prefixes.withIndex()) {
4747
val libDir = file("$prefix/lib")
4848
val version = run {
4949
for (filename in libDir.list()!!) {
50-
"""python(\d+\.\d+)""".toRegex().matchEntire(filename)?.let {
50+
"""python(\d+\.\d+[a-z]*)""".toRegex().matchEntire(filename)?.let {
5151
return@run it.groupValues[1]
5252
}
5353
}
@@ -64,9 +64,10 @@ for ((i, prefix) in prefixes.withIndex()) {
6464
val libPythonDir = file("$libDir/python$pythonVersion")
6565
val triplet = run {
6666
for (filename in libPythonDir.list()!!) {
67-
"""_sysconfigdata__android_(.+).py""".toRegex().matchEntire(filename)?.let {
68-
return@run it.groupValues[1]
69-
}
67+
"""_sysconfigdata_[a-z]*_android_(.+).py""".toRegex()
68+
.matchEntire(filename)?.let {
69+
return@run it.groupValues[1]
70+
}
7071
}
7172
throw GradleException("Failed to find Python triplet in $libPythonDir")
7273
}

Doc/c-api/arg.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ the minimal value for the corresponding signed integer type of the same size.
305305
``D`` (:class:`complex`) [Py_complex]
306306
Convert a Python complex number to a C :c:type:`Py_complex` structure.
307307

308-
.. deprecated:: next
308+
.. deprecated:: 3.15
309309

310310
For unsigned integer formats ``B``, ``H``, ``I``, ``k`` and ``K``,
311311
:exc:`DeprecationWarning` is emitted when the value is larger than

Doc/c-api/bytes.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ PyBytesWriter
236236
The :c:type:`PyBytesWriter` API can be used to create a Python :class:`bytes`
237237
object.
238238
239-
.. versionadded:: next
239+
.. versionadded:: 3.15
240240
241241
.. c:type:: PyBytesWriter
242242
@@ -259,6 +259,7 @@ Create, Finish, Discard
259259
If *size* is greater than zero, allocate *size* bytes, and set the
260260
writer size to *size*. The caller is responsible to write *size*
261261
bytes using :c:func:`PyBytesWriter_GetData`.
262+
This function does not overallocate.
262263
263264
On error, set an exception and return ``NULL``.
264265
@@ -349,6 +350,8 @@ Low-level API
349350
350351
Resize the writer to *size* bytes. It can be used to enlarge or to
351352
shrink the writer.
353+
This function typically overallocates to achieve amortized performance when
354+
resizing multiple times.
352355
353356
Newly allocated bytes are left uninitialized.
354357
@@ -360,6 +363,8 @@ Low-level API
360363
.. c:function:: int PyBytesWriter_Grow(PyBytesWriter *writer, Py_ssize_t grow)
361364
362365
Resize the writer by adding *grow* bytes to the current writer size.
366+
This function typically overallocates to achieve amortized performance when
367+
resizing multiple times.
363368
364369
Newly allocated bytes are left uninitialized.
365370

Doc/c-api/complex.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Complex Number Objects
1616
1717
The complex number value, using the C :c:type:`Py_complex` representation.
1818

19-
.. deprecated-removed:: next 3.20
19+
.. deprecated-removed:: 3.15 3.20
2020
Use :c:func:`PyComplex_AsCComplex` and
2121
:c:func:`PyComplex_FromCComplex` to convert a
2222
Python complex number to/from the C :c:type:`Py_complex`

Doc/c-api/function.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ There are a few functions specific to Python functions.
175175
176176
.. versionadded:: 3.12
177177
178+
- ``PyFunction_PYFUNC_EVENT_MODIFY_QUALNAME``
179+
180+
.. versionadded:: 3.15
178181
179182
.. c:type:: int (*PyFunction_WatchCallback)(PyFunction_WatchEvent event, PyFunctionObject *func, PyObject *new_value)
180183

Doc/c-api/object.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ Object Protocol
201201
This case can arise from forgetting ``NULL`` checks and would delete the
202202
attribute.
203203
204-
.. versionchanged:: next
204+
.. versionchanged:: 3.15
205205
Must not be called with NULL value if an exception is set.
206206
207207
@@ -226,7 +226,7 @@ Object Protocol
226226
For more details, see :c:func:`PyUnicode_InternFromString`, which may be
227227
used internally to create a key object.
228228
229-
.. versionchanged:: next
229+
.. versionchanged:: 3.15
230230
Must not be called with NULL value if an exception is set.
231231
232232
@@ -600,7 +600,7 @@ Object Protocol
600600
601601
Clear the managed dictionary of *obj*.
602602
603-
This function must only be called in a traverse function of the type which
603+
This function must only be called in a clear function of the type which
604604
has the :c:macro:`Py_TPFLAGS_MANAGED_DICT` flag set.
605605
606606
.. versionadded:: 3.13

Doc/c-api/stable.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ third-party distributors.
202202
ABI Checking
203203
============
204204

205-
.. versionadded:: next
205+
.. versionadded:: 3.15
206206

207207
Python includes a rudimentary check for ABI compatibility.
208208

@@ -249,7 +249,7 @@ The full API is described below for advanced use cases.
249249
may lead to crashes.
250250
In particular, it is not safe to examine the raised exception.
251251
252-
.. versionadded:: next
252+
.. versionadded:: 3.15
253253
254254
.. c:macro:: PyABIInfo_VAR(NAME)
255255
@@ -266,7 +266,7 @@ The full API is described below for advanced use cases.
266266
PyABIInfo_DEFAULT_ABI_VERSION
267267
}
268268
269-
.. versionadded:: next
269+
.. versionadded:: 3.15
270270

271271
.. c:type:: PyABIInfo
272272
@@ -294,7 +294,7 @@ The full API is described below for advanced use cases.
294294
Default flags, based on current values of macros such as
295295
:c:macro:`Py_LIMITED_API` and :c:macro:`Py_GIL_DISABLED`.
296296

297-
Alternately, the field can be set to to the following flags, combined
297+
Alternately, the field can be set to the following flags, combined
298298
by bitwise OR.
299299
Unused bits must be set to zero.
300300

@@ -352,7 +352,7 @@ The full API is described below for advanced use cases.
352352
values of macros such as :c:macro:`Py_LIMITED_API`,
353353
:c:macro:`PY_VERSION_HEX` and :c:macro:`Py_GIL_DISABLED`.
354354

355-
.. versionadded:: next
355+
.. versionadded:: 3.15
356356

357357

358358
.. _limited-api-list:

Doc/c-api/sys.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ accessible to C code. They all work with the current interpreter thread's
268268
If the non-existing object should not be treated as a failure, you can use
269269
:c:func:`PySys_GetOptionalAttr` instead.
270270
271-
.. versionadded:: next
271+
.. versionadded:: 3.15
272272
273273
.. c:function:: PyObject *PySys_GetAttrString(const char *name)
274274
@@ -279,7 +279,7 @@ accessible to C code. They all work with the current interpreter thread's
279279
If the non-existing object should not be treated as a failure, you can use
280280
:c:func:`PySys_GetOptionalAttrString` instead.
281281
282-
.. versionadded:: next
282+
.. versionadded:: 3.15
283283
284284
.. c:function:: int PySys_GetOptionalAttr(PyObject *name, PyObject **result)
285285
@@ -293,15 +293,15 @@ accessible to C code. They all work with the current interpreter thread's
293293
* Set an exception, set *\*result* to ``NULL``, and return ``-1``,
294294
if an error occurred.
295295
296-
.. versionadded:: next
296+
.. versionadded:: 3.15
297297
298298
.. c:function:: int PySys_GetOptionalAttrString(const char *name, PyObject **result)
299299
300300
This is the same as :c:func:`PySys_GetOptionalAttr`, but *name* is
301301
specified as a :c:expr:`const char*` UTF-8 encoded bytes string,
302302
rather than a :c:expr:`PyObject*`.
303303
304-
.. versionadded:: next
304+
.. versionadded:: 3.15
305305
306306
.. c:function:: PyObject *PySys_GetObject(const char *name)
307307

Doc/c-api/tuple.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Tuple Objects
4747
On success, return a new reference.
4848
On error, set an exception and return ``NULL``.
4949
50-
.. versionadded:: next
50+
.. versionadded:: 3.15
5151
5252
5353
.. c:function:: PyObject* PyTuple_Pack(Py_ssize_t n, ...)

0 commit comments

Comments
 (0)