Repository navigation
Please expose Expat >=2.6.0 API function XML_SetReparseDeferralEnabled #115398
Description
Activity
- addedtype-featureA feature request or enhancementA feature request or enhancement
on Feb 13, 2024 - added 5 commits that reference this issue
on Mar 2, 2024 - added a commit that references this issue
on Mar 4, 2024 28 remaining items
- added 2 commits that reference this issue
on Apr 2, 2024 - added a commit that references this issue
on Apr 14, 2024 - added 5 commits that reference this issue
on Apr 17, 2024 ⚠️ Linux distro maintainers.Python built
--with-system-expatwith expat >= 2.6 will require expat >= 2.6 on runtime as well. If you updated to expat >= 2.6 and built Python with this fix, do not allow your users to update Python independently without updating expat as well, or they will getundefined symbol: XML_SetReparseDeferralEnabledfrom pyexpat (e.g. when using the venv module).Reacted by Abel Aoun⚠️ Linux distro maintainers.Python built
--with-system-expatwith expat >= 2.6 will require expat >= 2.6 on runtime as well. If you updated to expat >= 2.6 and built Python with this fix, do not allow your users to update Python without updating expat as well, or they will getundefined symbol: XML_SetReparseDeferralEnabledfrom pyexpat (e.g. when using the venv module).@hroncok Thanks for the heads up. As far as I know this shouldn't be a problem for Tumbleweed because how it's updated, but for Leap is something to keep in mind.
- added a commit that references this issue
on Aug 14, 2024 On MSS it was reported 2.6.1 works with python 3.11.8 and 2.6.2 doesn't.
This is still a recurring issue, years on.
Reacted by Emile
Feature or enhancement
Proposal:
Hello CPython team! 👋
Expat 2.6.0 introduced a new function
XML_SetReparseDeferralEnabledthat currently neitherxml.parsers.expat.XMLParserTypeof pyexpat norxml.etree.ElementTree.XMLParserof ElementTree give access to it, so when some Python-based library or application finds themselves in a situation where toggling reparse deferral is beneficial or needed for their scenario in the future, they will not be able to do so with ease or at all.Please note that this is a sibling ticket to #90949 in some sense and implementations could be combined or done in one go, potentially.
Also please note that…
xml.etree.ElementTree.XMLParsera new methoddef flush(self):could be a reasonable API addition based on the idea gh-115133: test_xml_etree.py: Fix for Expat >=2.6.0 with reparse deferral (fixes #115133) #115138 (comment) ;xml.sax.xmlreader.IncrementalParser.I cannot provide a pull request on the topic economically myself unfortunately, but I am happy to support any related efforts (including voice calls on the topic as needed). Thanks in advance!
Best, Sebastian
CC #90949
CC #115133
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Linked PRs
hasattrwith checking for 3.13 Expat API availability #116278PyExpat_CAPI_MAGICversion bump #116411