Skip to content

Commit 5014423

Browse files
committed
Demo more quiet version without ".. note::"
1 parent 67b5221 commit 5014423

File tree

2 files changed

+45
-58
lines changed

2 files changed

+45
-58
lines changed

Doc/library/pyexpat.rst

Lines changed: 33 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -223,14 +223,12 @@ XMLParser Objects
223223
Calling ``SetReparseDeferralEnabled(True)`` allows re-enabling reparse
224224
deferral.
225225

226-
.. note::
227-
228-
:meth:`!SetReparseDeferralEnabled`
229-
has been backported to some prior releases of CPython as a security fix.
230-
Check for availability of
231-
:meth:`!SetReparseDeferralEnabled`
232-
using :func:`hasattr` if used in code running across a variety of Python
233-
versions.
226+
Note that :meth:`!SetReparseDeferralEnabled`
227+
has been backported to some prior releases of CPython as a security fix.
228+
Check for availability of
229+
:meth:`!SetReparseDeferralEnabled`
230+
using :func:`hasattr` if used in code running across a variety of Python
231+
versions.
234232

235233
.. versionadded:: 3.13
236234

@@ -261,19 +259,18 @@ against some common XML vulnerabilities.
261259
The corresponding :attr:`~ExpatError.lineno` and :attr:`~ExpatError.offset`
262260
should not be used as they may have no special meaning.
263261

262+
Note that :meth:`!SetBillionLaughsAttackProtectionActivationThreshold`
263+
has been backported to some prior releases of CPython as a security fix.
264+
Check for availability of
265+
:meth:`!SetBillionLaughsAttackProtectionActivationThreshold`
266+
using :func:`hasattr` if used in code running across a variety of Python
267+
versions.
268+
264269
.. note::
265270

266271
Activation thresholds below 4 MiB are known to break support for DITA 1.3
267272
payload and are hence not recommended.
268273

269-
.. note::
270-
271-
:meth:`!SetBillionLaughsAttackProtectionActivationThreshold`
272-
has been backported to some prior releases of CPython as a security fix.
273-
Check for availability of
274-
:meth:`!SetBillionLaughsAttackProtectionActivationThreshold`
275-
using :func:`hasattr` if used in code running across a variety of Python
276-
versions.
277274

278275
.. versionadded:: next
279276

@@ -301,21 +298,19 @@ against some common XML vulnerabilities.
301298
The corresponding :attr:`~ExpatError.lineno` and :attr:`~ExpatError.offset`
302299
should not be used as they may have no special meaning.
303300

301+
Note that :meth:`!SetBillionLaughsAttackProtectionMaximumAmplification`
302+
has been backported to some prior releases of CPython as a security fix.
303+
Check for availability of
304+
:meth:`!SetBillionLaughsAttackProtectionMaximumAmplification`
305+
using :func:`hasattr` if used in code running across a variety of Python
306+
versions.
307+
304308
.. note::
305309

306310
The maximum amplification factor is only considered if the threshold
307311
that can be adjusted by :meth:`.SetBillionLaughsAttackProtectionActivationThreshold`
308312
is exceeded.
309313

310-
.. note::
311-
312-
:meth:`!SetBillionLaughsAttackProtectionMaximumAmplification`
313-
has been backported to some prior releases of CPython as a security fix.
314-
Check for availability of
315-
:meth:`!SetBillionLaughsAttackProtectionMaximumAmplification`
316-
using :func:`hasattr` if used in code running across a variety of Python
317-
versions.
318-
319314
.. versionadded:: next
320315

321316
.. method:: xmlparser.SetAllocTrackerActivationThreshold(threshold, /)
@@ -331,14 +326,12 @@ against some common XML vulnerabilities.
331326
The corresponding :attr:`~ExpatError.lineno` and :attr:`~ExpatError.offset`
332327
should not be used as they may have no special meaning.
333328

334-
.. note::
335-
336-
:meth:`!SetAllocTrackerActivationThreshold`
337-
has been backported to some prior releases of CPython as a security fix.
338-
Check for availability of
339-
:meth:`!SetAllocTrackerActivationThreshold`
340-
using :func:`hasattr` if used in code running across a variety of Python
341-
versions.
329+
Note that :meth:`!SetAllocTrackerActivationThreshold`
330+
has been backported to some prior releases of CPython as a security fix.
331+
Check for availability of
332+
:meth:`!SetAllocTrackerActivationThreshold`
333+
using :func:`hasattr` if used in code running across a variety of Python
334+
versions.
342335

343336
.. versionadded:: next
344337

@@ -365,21 +358,19 @@ against some common XML vulnerabilities.
365358
The corresponding :attr:`~ExpatError.lineno` and :attr:`~ExpatError.offset`
366359
should not be used as they may have no special meaning.
367360

361+
Note that :meth:`!SetAllocTrackerMaximumAmplification`
362+
has been backported to some prior releases of CPython as a security fix.
363+
Check for availability of
364+
:meth:`!SetAllocTrackerMaximumAmplification`
365+
using :func:`hasattr` if used in code running across a variety of Python
366+
versions.
367+
368368
.. note::
369369

370370
The maximum amplification factor is only considered if the threshold
371371
that can be adjusted by :meth:`.SetAllocTrackerActivationThreshold`
372372
is exceeded.
373373

374-
.. note::
375-
376-
:meth:`!SetAllocTrackerMaximumAmplification`
377-
has been backported to some prior releases of CPython as a security fix.
378-
Check for availability of
379-
:meth:`!SetAllocTrackerMaximumAmplification`
380-
using :func:`hasattr` if used in code running across a variety of Python
381-
versions.
382-
383374
.. versionadded:: next
384375

385376

Doc/library/xml.etree.elementtree.rst

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1398,14 +1398,12 @@ XMLParser Objects
13981398
Disabling reparse deferral has security consequences; please see
13991399
:meth:`xml.parsers.expat.xmlparser.SetReparseDeferralEnabled` for details.
14001400

1401-
.. note::
1402-
1403-
:meth:`!flush`
1404-
has been backported to some prior releases of CPython as a security
1405-
fix. Check for availability of
1406-
:meth:`!flush`
1407-
using :func:`hasattr` if used in code running across a variety of
1408-
Python versions.
1401+
Note that :meth:`!flush`
1402+
has been backported to some prior releases of CPython as a security fix.
1403+
Check for availability of
1404+
:meth:`!flush`
1405+
using :func:`hasattr` if used in code running across a variety of Python
1406+
versions.
14091407

14101408
.. versionadded:: 3.13
14111409

@@ -1480,14 +1478,12 @@ XMLPullParser Objects
14801478
Disabling reparse deferral has security consequences; please see
14811479
:meth:`xml.parsers.expat.xmlparser.SetReparseDeferralEnabled` for details.
14821480

1483-
.. note::
1484-
1485-
:meth:`!flush`
1486-
has been backported to some prior releases of CPython as a security
1487-
fix. Check for availability of
1488-
:meth:`!flush`
1489-
using :func:`hasattr` if used in code running across a variety of
1490-
Python versions.
1481+
Note that :meth:`!flush`
1482+
has been backported to some prior releases of CPython as a security fix.
1483+
Check for availability of
1484+
:meth:`!flush`
1485+
using :func:`hasattr` if used in code running across a variety of Python
1486+
versions.
14911487

14921488
.. versionadded:: 3.13
14931489

0 commit comments

Comments
 (0)