Skip to content

Commit 0299994

Browse files
committed
Merge branch 'main' into dataclass-lazy-inspect
2 parents 65d92cc + 4b33308 commit 0299994

File tree

318 files changed

+20697
-3676
lines changed

Some content is hidden

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

318 files changed

+20697
-3676
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ jobs:
354354
with:
355355
persist-credentials: false
356356
- name: Build and test
357-
run: ./Android/android.py ci --fast-ci ${{ matrix.arch }}-linux-android
357+
run: python3 Platforms/Android ci --fast-ci ${{ matrix.arch }}-linux-android
358358

359359
build-ios:
360360
name: iOS

.github/workflows/mypy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ on:
1919
- "Tools/build/consts_getter.py"
2020
- "Tools/build/deepfreeze.py"
2121
- "Tools/build/generate-build-details.py"
22+
- "Tools/build/generate_levenshtein_examples.py"
2223
- "Tools/build/generate_sbom.py"
2324
- "Tools/build/generate_stdlib_module_names.py"
2425
- "Tools/build/mypy.ini"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*.cover
66
*.iml
77
*.o
8+
*.o.tmp
89
*.lto
910
*.a
1011
*.so

Doc/c-api/allocation.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
.. _allocating-objects:
44

5-
Allocating Objects on the Heap
5+
Allocating objects on the heap
66
==============================
77

88

@@ -153,18 +153,20 @@ Allocating Objects on the Heap
153153
To allocate and create extension modules.
154154

155155

156-
Deprecated aliases
157-
^^^^^^^^^^^^^^^^^^
156+
Soft-deprecated aliases
157+
^^^^^^^^^^^^^^^^^^^^^^^
158158

159-
These are :term:`soft deprecated` aliases to existing functions and macros.
159+
.. soft-deprecated:: 3.15
160+
161+
These are aliases to existing functions and macros.
160162
They exist solely for backwards compatibility.
161163

162164

163165
.. list-table::
164166
:widths: auto
165167
:header-rows: 1
166168

167-
* * Deprecated alias
169+
* * Soft-deprecated alias
168170
* Function
169171
* * .. c:macro:: PyObject_NEW(type, typeobj)
170172
* :c:macro:`PyObject_New`

Doc/c-api/bytes.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ called with a non-bytes parameter.
4747
*len* on success, and ``NULL`` on failure. If *v* is ``NULL``, the contents of
4848
the bytes object are uninitialized.
4949
50-
.. deprecated:: 3.15
51-
``PyBytes_FromStringAndSize(NULL, len)`` is :term:`soft deprecated`,
52-
use the :c:type:`PyBytesWriter` API instead.
50+
.. soft-deprecated:: 3.15
51+
Use the :c:type:`PyBytesWriter` API instead of
52+
``PyBytes_FromStringAndSize(NULL, len)``.
5353
5454
5555
.. c:function:: PyObject* PyBytes_FromFormat(const char *format, ...)
@@ -238,9 +238,8 @@ called with a non-bytes parameter.
238238
*\*bytes* is set to ``NULL``, :exc:`MemoryError` is set, and ``-1`` is
239239
returned.
240240
241-
.. deprecated:: 3.15
242-
The function is :term:`soft deprecated`,
243-
use the :c:type:`PyBytesWriter` API instead.
241+
.. soft-deprecated:: 3.15
242+
Use the :c:type:`PyBytesWriter` API instead.
244243
245244
246245
.. c:function:: PyObject *PyBytes_Repr(PyObject *bytes, int smartquotes)

Doc/c-api/extension-modules.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,10 @@ the :c:data:`Py_mod_multiple_interpreters` slot.
191191
``PyInit`` function
192192
...................
193193

194-
.. deprecated:: 3.15
194+
.. soft-deprecated:: 3.15
195195

196-
This functionality is :term:`soft deprecated`.
197-
It will not get new features, but there are no plans to remove it.
196+
This functionality will not get new features,
197+
but there are no plans to remove it.
198198

199199
Instead of :c:func:`PyModExport_modulename`, an extension module can define
200200
an older-style :dfn:`initialization function` with the signature:
@@ -272,10 +272,9 @@ For example, a module called ``spam`` would be defined like this::
272272
Legacy single-phase initialization
273273
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
274274
275-
.. deprecated:: 3.15
275+
.. soft-deprecated:: 3.15
276276
277-
Single-phase initialization is :term:`soft deprecated`.
278-
It is a legacy mechanism to initialize extension
277+
Single-phase initialization is a legacy mechanism to initialize extension
279278
modules, with known drawbacks and design flaws. Extension module authors
280279
are encouraged to use multi-phase initialization instead.
281280

Doc/c-api/file.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
.. _fileobjects:
44

5-
File Objects
5+
File objects
66
------------
77

88
.. index:: pair: object; file
@@ -136,11 +136,12 @@ the :mod:`io` APIs instead.
136136
failure; the appropriate exception will be set.
137137
138138
139-
Deprecated API
140-
^^^^^^^^^^^^^^
139+
Soft-deprecated API
140+
^^^^^^^^^^^^^^^^^^^
141141
142+
.. soft-deprecated:: 3.15
142143
143-
These are :term:`soft deprecated` APIs that were included in Python's C API
144+
These are APIs that were included in Python's C API
144145
by mistake. They are documented solely for completeness; use other
145146
``PyFile*`` APIs instead.
146147

Doc/c-api/float.rst

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ Floating-Point Objects
8686
It is equivalent to the :c:macro:`!INFINITY` macro from the C11 standard
8787
``<math.h>`` header.
8888
89-
.. deprecated:: 3.15
90-
The macro is :term:`soft deprecated`.
89+
.. soft-deprecated:: 3.15
9190
9291
9392
.. c:macro:: Py_NAN
@@ -103,8 +102,7 @@ Floating-Point Objects
103102
104103
Equivalent to :c:macro:`!INFINITY`.
105104
106-
.. deprecated:: 3.14
107-
The macro is :term:`soft deprecated`.
105+
.. soft-deprecated:: 3.14
108106
109107
110108
.. c:macro:: Py_MATH_E
@@ -161,26 +159,26 @@ Floating-Point Objects
161159
that is, it is normal, subnormal or zero, but not infinite or NaN.
162160
Return ``0`` otherwise.
163161
164-
.. deprecated:: 3.14
165-
The macro is :term:`soft deprecated`. Use :c:macro:`!isfinite` instead.
162+
.. soft-deprecated:: 3.14
163+
Use :c:macro:`!isfinite` instead.
166164
167165
168166
.. c:macro:: Py_IS_INFINITY(X)
169167
170168
Return ``1`` if the given floating-point number *X* is positive or negative
171169
infinity. Return ``0`` otherwise.
172170
173-
.. deprecated:: 3.14
174-
The macro is :term:`soft deprecated`. Use :c:macro:`!isinf` instead.
171+
.. soft-deprecated:: 3.14
172+
Use :c:macro:`!isinf` instead.
175173
176174
177175
.. c:macro:: Py_IS_NAN(X)
178176
179177
Return ``1`` if the given floating-point number *X* is a not-a-number (NaN)
180178
value. Return ``0`` otherwise.
181179
182-
.. deprecated:: 3.14
183-
The macro is :term:`soft deprecated`. Use :c:macro:`!isnan` instead.
180+
.. soft-deprecated:: 3.14
181+
Use :c:macro:`!isnan` instead.
184182
185183
186184
Pack and Unpack functions

Doc/c-api/frame.rst

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. highlight:: c
22

3-
Frame Objects
3+
Frame objects
44
-------------
55

66
.. c:type:: PyFrameObject
@@ -147,7 +147,7 @@ See also :ref:`Reflection <reflection>`.
147147
Return the line number that *frame* is currently executing.
148148
149149
150-
Frame Locals Proxies
150+
Frame locals proxies
151151
^^^^^^^^^^^^^^^^^^^^
152152
153153
.. versionadded:: 3.13
@@ -169,7 +169,7 @@ See :pep:`667` for more information.
169169
Return non-zero if *obj* is a frame :func:`locals` proxy.
170170
171171
172-
Legacy Local Variable APIs
172+
Legacy local variable APIs
173173
^^^^^^^^^^^^^^^^^^^^^^^^^^
174174
175175
These APIs are :term:`soft deprecated`. As of Python 3.13, they do nothing.
@@ -178,48 +178,42 @@ They exist solely for backwards compatibility.
178178
179179
.. c:function:: void PyFrame_LocalsToFast(PyFrameObject *f, int clear)
180180
181-
This function is :term:`soft deprecated` and does nothing.
182-
183181
Prior to Python 3.13, this function would copy the :attr:`~frame.f_locals`
184182
attribute of *f* to the internal "fast" array of local variables, allowing
185183
changes in frame objects to be visible to the interpreter. If *clear* was
186184
true, this function would process variables that were unset in the locals
187185
dictionary.
188186
189-
.. versionchanged:: 3.13
187+
.. soft-deprecated:: 3.13
190188
This function now does nothing.
191189
192190
193191
.. c:function:: void PyFrame_FastToLocals(PyFrameObject *f)
194192
195-
This function is :term:`soft deprecated` and does nothing.
196-
197193
Prior to Python 3.13, this function would copy the internal "fast" array
198194
of local variables (which is used by the interpreter) to the
199195
:attr:`~frame.f_locals` attribute of *f*, allowing changes in local
200196
variables to be visible to frame objects.
201197
202-
.. versionchanged:: 3.13
198+
.. soft-deprecated:: 3.13
203199
This function now does nothing.
204200
205201
206202
.. c:function:: int PyFrame_FastToLocalsWithError(PyFrameObject *f)
207203
208-
This function is :term:`soft deprecated` and does nothing.
209-
210204
Prior to Python 3.13, this function was similar to
211205
:c:func:`PyFrame_FastToLocals`, but would return ``0`` on success, and
212206
``-1`` with an exception set on failure.
213207
214-
.. versionchanged:: 3.13
208+
.. soft-deprecated:: 3.13
215209
This function now does nothing.
216210
217211
218212
.. seealso::
219213
:pep:`667`
220214
221215
222-
Internal Frames
216+
Internal frames
223217
^^^^^^^^^^^^^^^
224218
225219
Unless using :pep:`523`, you will not need this.
@@ -249,5 +243,3 @@ Unless using :pep:`523`, you will not need this.
249243
Return the currently executing line number, or -1 if there is no line number.
250244
251245
.. versionadded:: 3.12
252-
253-

Doc/c-api/interp-lifecycle.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,11 @@ Initializing and finalizing the interpreter
410410
(zero) if not. After :c:func:`Py_FinalizeEx` is called, this returns false until
411411
:c:func:`Py_Initialize` is called again.
412412
413+
.. versionchanged:: next
414+
This function no longer returns true until initialization has fully
415+
completed, including import of the :mod:`site` module. Previously it
416+
could return true while :c:func:`Py_Initialize` was still running.
417+
413418
414419
.. c:function:: int Py_IsFinalizing()
415420

0 commit comments

Comments
 (0)