diff options
| author | Sebastian Pipping <sebastian@pipping.org> | 2024-03-06 19:08:25 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-06 19:08:25 (GMT) |
| commit | 73807eb634315f70a464a18feaae33d9e065de09 (patch) | |
| tree | 42828bc876093724098c008483f19ee72791a133 /Doc/library/xml.etree.elementtree.rst | |
| parent | 8a8e9204d1f737fa5dc6f5087411bdbe8139d3b2 (diff) | |
| download | cpython-73807eb634315f70a464a18feaae33d9e065de09.zip cpython-73807eb634315f70a464a18feaae33d9e065de09.tar.gz cpython-73807eb634315f70a464a18feaae33d9e065de09.tar.bz2 | |
gh-115398: Suggest use of `hasattr` with checking for 3.13 Expat API availability (GH-116278)
Suggest use of "hasattr" with checking for 3.13 Expat API availability
Diffstat (limited to 'Doc/library/xml.etree.elementtree.rst')
| -rw-r--r-- | Doc/library/xml.etree.elementtree.rst | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Doc/library/xml.etree.elementtree.rst b/Doc/library/xml.etree.elementtree.rst index 19c7af4..5955647 100644 --- a/Doc/library/xml.etree.elementtree.rst +++ b/Doc/library/xml.etree.elementtree.rst @@ -1402,6 +1402,11 @@ XMLParser Objects Disabling reparse deferral has security consequences; please see :meth:`xml.parsers.expat.xmlparser.SetReparseDeferralEnabled` for details. + Note that :meth:`flush` has been backported to some prior releases of + CPython as a security fix. Check for availability of :meth:`flush` + using :func:`hasattr` if used in code running across a variety of Python + versions. + .. versionadded:: 3.13 @@ -1475,6 +1480,11 @@ XMLPullParser Objects Disabling reparse deferral has security consequences; please see :meth:`xml.parsers.expat.xmlparser.SetReparseDeferralEnabled` for details. + Note that :meth:`flush` has been backported to some prior releases of + CPython as a security fix. Check for availability of :meth:`flush` + using :func:`hasattr` if used in code running across a variety of Python + versions. + .. versionadded:: 3.13 .. method:: close() |
