File tree 3 files changed +20
-0
lines changed
Misc/NEWS.d/next/Documentation
3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -217,6 +217,12 @@ XMLParser Objects
217
217
Calling ``SetReparseDeferralEnabled(True) `` allows re-enabling reparse
218
218
deferral.
219
219
220
+ Note that :meth: `SetReparseDeferralEnabled ` has been backported to prior
221
+ releases of CPython, so it is recommended to check for availability of
222
+ :meth: `SetReparseDeferralEnabled ` using :func: `hasattr `
223
+ (rather than inspecting :const: `xml.parsers.expat.version_info `),
224
+ at runtime.
225
+
220
226
.. versionadded :: 3.13
221
227
222
228
.. method :: xmlparser.GetReparseDeferralEnabled()
Original file line number Diff line number Diff line change @@ -1402,6 +1402,12 @@ XMLParser Objects
1402
1402
Disabling reparse deferral has security consequences; please see
1403
1403
:meth: `xml.parsers.expat.xmlparser.SetReparseDeferralEnabled ` for details.
1404
1404
1405
+ Note that :meth: `flush ` has been backported to prior releases of CPython,
1406
+ so it is recommended to check for availability of :meth: `flush `
1407
+ using :func: `hasattr `
1408
+ (rather than inspecting :const: `xml.parsers.expat.version_info `),
1409
+ at runtime.
1410
+
1405
1411
.. versionadded :: 3.13
1406
1412
1407
1413
@@ -1475,6 +1481,12 @@ XMLPullParser Objects
1475
1481
Disabling reparse deferral has security consequences; please see
1476
1482
:meth: `xml.parsers.expat.xmlparser.SetReparseDeferralEnabled ` for details.
1477
1483
1484
+ Note that :meth: `flush ` has been backported to prior releases of CPython,
1485
+ so it is recommended to check for availability of :meth: `flush `
1486
+ using :func: `hasattr `
1487
+ (rather than inspecting :const: `xml.parsers.expat.version_info `),
1488
+ at runtime.
1489
+
1478
1490
.. versionadded :: 3.13
1479
1491
1480
1492
.. method :: close()
Original file line number Diff line number Diff line change
1
+ Suggest use of :func: `hasattr ` when checking for availability of Expat reparse
2
+ deferral security API.
You can’t perform that action at this time.
0 commit comments