File tree Expand file tree Collapse file tree 3 files changed +20
-0
lines changed
Misc/NEWS.d/next/Documentation Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -217,6 +217,12 @@ XMLParser Objects
217217 Calling ``SetReparseDeferralEnabled(True) `` allows re-enabling reparse
218218 deferral.
219219
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+
220226 .. versionadded :: 3.13
221227
222228.. method :: xmlparser.GetReparseDeferralEnabled()
Original file line number Diff line number Diff line change @@ -1402,6 +1402,12 @@ XMLParser Objects
14021402 Disabling reparse deferral has security consequences; please see
14031403 :meth: `xml.parsers.expat.xmlparser.SetReparseDeferralEnabled ` for details.
14041404
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+
14051411 .. versionadded :: 3.13
14061412
14071413
@@ -1475,6 +1481,12 @@ XMLPullParser Objects
14751481 Disabling reparse deferral has security consequences; please see
14761482 :meth: `xml.parsers.expat.xmlparser.SetReparseDeferralEnabled ` for details.
14771483
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+
14781490 .. versionadded :: 3.13
14791491
14801492 .. method :: close()
Original file line number Diff line number Diff line change 1+ Suggest use of "hasattr" when checking for availability of Expat reparse
2+ deferral security API.
You can’t perform that action at this time.
0 commit comments