Skip to content

Commit 3f88cf5

Browse files
committed
Use 'soft-deprecated' directive instead of 'deprecated'
1 parent df3809c commit 3f88cf5

File tree

12 files changed

+42
-65
lines changed

12 files changed

+42
-65
lines changed

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

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -536,16 +536,14 @@ have been standardized in C11 (or previous standards).
536536

537537
Use the standard ``alignas`` specifier rather than this macro.
538538

539-
.. deprecated:: 3.15
540-
The macro is :term:`soft deprecated`.
539+
.. soft-deprecated:: 3.15
541540

542541
.. c:macro:: PY_FORMAT_SIZE_T
543542
544543
The :c:func:`printf` formatting modifier for :c:type:`size_t`.
545544
Use ``"z"`` directly instead.
546545

547-
.. deprecated:: 3.15
548-
The macro is :term:`soft deprecated`.
546+
.. soft-deprecated:: 3.15
549547

550548
.. c:macro:: Py_LL(number)
551549
Py_ULL(number)
@@ -558,8 +556,7 @@ have been standardized in C11 (or previous standards).
558556
559557
Consider using the C99 standard suffixes ``LL`` and ``LLU`` directly.
560558
561-
.. deprecated:: 3.15
562-
The macro is :term:`soft deprecated`.
559+
.. soft-deprecated:: 3.15
563560
564561
.. c:macro:: PY_LONG_LONG
565562
PY_INT32_T
@@ -572,8 +569,7 @@ have been standardized in C11 (or previous standards).
572569
respectively.
573570
Historically, these types needed compiler-specific extensions.
574571
575-
.. deprecated:: 3.15
576-
These macros are :term:`soft deprecated`.
572+
.. soft-deprecated:: 3.15
577573
578574
.. c:macro:: PY_LLONG_MIN
579575
PY_LLONG_MAX
@@ -587,16 +583,14 @@ have been standardized in C11 (or previous standards).
587583
The required header, ``<limits.h>``,
588584
:ref:`is included <capi-system-includes>` in ``Python.h``.
589585
590-
.. deprecated:: 3.15
591-
These macros are :term:`soft deprecated`.
586+
.. soft-deprecated:: 3.15
592587
593588
.. c:macro:: Py_MEMCPY(dest, src, n)
594589
595590
This is a :term:`soft deprecated` alias to :c:func:`!memcpy`.
596591
Use :c:func:`!memcpy` directly instead.
597592
598-
.. deprecated:: 3.14
599-
The macro is :term:`soft deprecated`.
593+
.. soft-deprecated:: 3.14
600594
601595
.. c:macro:: Py_UNICODE_SIZE
602596
@@ -606,16 +600,14 @@ have been standardized in C11 (or previous standards).
606600
The required header for the latter, ``<limits.h>``,
607601
:ref:`is included <capi-system-includes>` in ``Python.h``.
608602
609-
.. deprecated:: 3.15
610-
The macro is :term:`soft deprecated`.
603+
.. soft-deprecated:: 3.15
611604
612605
.. c:macro:: Py_UNICODE_WIDE
613606
614607
Defined if ``wchar_t`` can hold a Unicode character (UCS-4).
615608
Use ``sizeof(wchar_t) >= 4`` instead
616609
617-
.. deprecated:: 3.15
618-
The macro is :term:`soft deprecated`.
610+
.. soft-deprecated:: 3.15
619611
620612
.. c:macro:: Py_VA_COPY
621613
@@ -627,8 +619,7 @@ have been standardized in C11 (or previous standards).
627619
.. versionchanged:: 3.6
628620
This is now an alias to ``va_copy``.
629621
630-
.. deprecated:: 3.15
631-
The macro is :term:`soft deprecated`.
622+
.. soft-deprecated:: 3.15
632623
633624
634625
.. _api-objects:

Doc/c-api/long.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,7 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
201201
Exactly equivalent to the preferred ``PyLong_AsLong``. In particular,
202202
it can fail with :exc:`OverflowError` or another exception.
203203
204-
.. deprecated:: 3.14
205-
The function is soft deprecated.
204+
.. soft-deprecated:: 3.14
206205
207206
.. c:function:: int PyLong_AsInt(PyObject *obj)
208207

Doc/c-api/module.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -954,9 +954,7 @@ or code that creates modules dynamically.
954954
// PyModule_AddObject() stole a reference to obj:
955955
// Py_XDECREF(obj) is not needed here.
956956
957-
.. deprecated:: 3.13
958-
959-
:c:func:`PyModule_AddObject` is :term:`soft deprecated`.
957+
.. soft-deprecated:: 3.13
960958
961959
962960
.. c:function:: int PyModule_AddIntConstant(PyObject *module, const char *name, long value)

Doc/c-api/monitoring.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,4 @@ would typically correspond to a Python function.
205205
206206
.. versionadded:: 3.13
207207
208-
.. deprecated:: 3.14
209-
210-
This function is :term:`soft deprecated`.
208+
.. soft-deprecated:: 3.14

Doc/c-api/sequence.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,8 @@ Sequence Protocol
109109
110110
Alias for :c:func:`PySequence_Contains`.
111111
112-
.. deprecated:: 3.14
113-
The function is :term:`soft deprecated` and should no longer be used to
114-
write new code.
112+
.. soft-deprecated:: 3.14
113+
The function is should no longer be used to write new code.
115114
116115
117116
.. c:function:: Py_ssize_t PySequence_Index(PyObject *o, PyObject *value)

Doc/library/ctypes.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1756,11 +1756,10 @@ as a default or fallback.
17561756
(or by) Python.
17571757
It is recommended to only use this function as a default or fallback,
17581758

1759-
.. deprecated:: 3.15
1759+
.. soft-deprecated:: 3.15
17601760

1761-
This function is :term:`soft deprecated`.
1762-
It is kept for use in cases where it works, but not expected to be
1763-
updated for additional platforms and configurations.
1761+
This function is kept for use in cases where it works, but not expected to
1762+
be updated for additional platforms and configurations.
17641763

17651764
On Linux, :func:`!find_library` tries to run external
17661765
programs (``/sbin/ldconfig``, ``gcc``, ``objdump`` and ``ld``) to find the

Doc/library/math.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -781,9 +781,8 @@ the following functions from the :mod:`math.integer` module:
781781
Floats with integral values (like ``5.0``) are no longer accepted in the
782782
:func:`factorial` function.
783783

784-
.. deprecated:: 3.15
785-
These aliases are :term:`soft deprecated` in favor of the
786-
:mod:`math.integer` functions.
784+
.. soft-deprecated:: 3.15
785+
Use the :mod:`math.integer` functions instead of these aliases.
787786

788787

789788
Constants

0 commit comments

Comments
 (0)