Skip to content

Commit 6f234a4

Browse files
committed
Merge remote-tracking branch 'upstream/main' into gh-145742-work
2 parents 9f40ae4 + 3fd61b7 commit 6f234a4

File tree

81 files changed

+1217
-485
lines changed

Some content is hidden

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

81 files changed

+1217
-485
lines changed

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ Lib/test/xmltestdata/* noeol
3434
Lib/venv/scripts/common/activate text eol=lf
3535
Lib/venv/scripts/posix/* text eol=lf
3636

37+
# Prevent GitHub's web conflict editor from converting LF to CRLF
38+
*.rst text eol=lf
39+
3740
# CRLF files
3841
[attr]dos text eol=crlf
3942

.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"

.github/workflows/reusable-san.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,15 @@ jobs:
4040
# Install clang
4141
wget https://apt.llvm.org/llvm.sh
4242
chmod +x llvm.sh
43+
sudo ./llvm.sh 20
44+
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-20 100
45+
sudo update-alternatives --set clang /usr/bin/clang-20
46+
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-20 100
47+
sudo update-alternatives --set clang++ /usr/bin/clang++-20
4348
4449
if [ "${SANITIZER}" = "TSan" ]; then
45-
sudo ./llvm.sh 17 # gh-121946: llvm-18 package is temporarily broken
46-
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-17 100
47-
sudo update-alternatives --set clang /usr/bin/clang-17
48-
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-17 100
49-
sudo update-alternatives --set clang++ /usr/bin/clang++-17
5050
# Reduce ASLR to avoid TSan crashing
5151
sudo sysctl -w vm.mmap_rnd_bits=28
52-
else
53-
sudo ./llvm.sh 20
5452
fi
5553
5654
- name: Sanitizer option setup

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/buffer.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,9 @@ readonly, format
258258

259259
.. c:macro:: PyBUF_WRITEABLE
260260
261-
This is a :term:`soft deprecated` alias to :c:macro:`PyBUF_WRITABLE`.
261+
This is an alias to :c:macro:`PyBUF_WRITABLE`.
262+
263+
.. soft-deprecated:: 3.13
262264

263265
.. c:macro:: PyBUF_FORMAT
264266

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/code.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,14 +212,16 @@ bound into a function.
212212
213213
.. c:function:: PyObject *PyCode_Optimize(PyObject *code, PyObject *consts, PyObject *names, PyObject *lnotab_obj)
214214
215-
This is a :term:`soft deprecated` function that does nothing.
215+
This is a function that does nothing.
216216
217217
Prior to Python 3.10, this function would perform basic optimizations to a
218218
code object.
219219
220220
.. versionchanged:: 3.10
221221
This function now does nothing.
222222
223+
.. soft-deprecated:: 3.13
224+
223225
224226
.. _c_codeobject_flags:
225227

Doc/c-api/descriptor.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,16 @@ found in the dictionary of type objects.
140140
141141
.. c:macro:: PyDescr_COMMON
142142
143-
This is a :term:`soft deprecated` macro including the common fields for a
143+
This is a macro including the common fields for a
144144
descriptor object.
145145
146146
This was included in Python's C API by mistake; do not use it in extensions.
147147
For creating custom descriptor objects, create a class implementing the
148148
descriptor protocol (:c:member:`~PyTypeObject.tp_descr_get` and
149149
:c:member:`~PyTypeObject.tp_descr_set`).
150150
151+
.. soft-deprecated:: 3.15
152+
151153
152154
Built-in descriptors
153155
^^^^^^^^^^^^^^^^^^^^

Doc/c-api/exceptions.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -818,14 +818,16 @@ Exception Classes
818818
819819
.. c:macro:: PyException_HEAD
820820
821-
This is a :term:`soft deprecated` macro including the base fields for an
821+
This is a macro including the base fields for an
822822
exception object.
823823
824824
This was included in Python's C API by mistake and is not designed for use
825825
in extensions. For creating custom exception objects, use
826826
:c:func:`PyErr_NewException` or otherwise create a class inheriting from
827827
:c:data:`PyExc_BaseException`.
828828
829+
.. soft-deprecated:: 3.15
830+
829831
830832
Exception Objects
831833
=================

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

0 commit comments

Comments
 (0)