Skip to content

Please expose Expat >=2.6.0 API function XML_SetReparseDeferralEnabled #115398

Description

@hartwork

Feature or enhancement

Proposal:

Hello CPython team! 👋

Expat 2.6.0 introduced a new function XML_SetReparseDeferralEnabled that currently neither xml.parsers.expat.XMLParserType of pyexpat nor xml.etree.ElementTree.XMLParser of 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…

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

Activity

  1. added a commit that references this issue on Feb 29, 2024
  2. added 5 commits that reference this issue on Mar 2, 2024
  3. added a commit that references this issue on Mar 4, 2024
  4. added 2 commits that reference this issue on Mar 4, 2024
  5. added a commit that references this issue on Mar 6, 2024
  6. added 2 commits that reference this issue on Mar 6, 2024
  7. added a commit that references this issue on Mar 6, 2024
  8. 28 remaining items

  9. added 2 commits that reference this issue on Mar 27, 2024
  10. added a commit that references this issue on Apr 14, 2024
  11. added 5 commits that reference this issue on Apr 17, 2024
  12. hroncok commented on Apr 18, 2024

    @hroncok
    Contributor

    ⚠️ Linux distro maintainers.

    Python built --with-system-expat with 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 get undefined symbol: XML_SetReparseDeferralEnabled from pyexpat (e.g. when using the venv module).

    https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org/thread/7XHGWHBQDNFKNGSZTP44SSD6PQKZPG6C/

    cc @mgorny @danigm @mcepl @mitya57 @asottile

  13. danigm commented on Apr 18, 2024

    @danigm
    Contributor

    ⚠️ Linux distro maintainers.

    Python built --with-system-expat with 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 get undefined symbol: XML_SetReparseDeferralEnabled from pyexpat (e.g. when using the venv module).

    https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org/thread/7XHGWHBQDNFKNGSZTP44SSD6PQKZPG6C/

    @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.

  14. added a commit that references this issue on Aug 14, 2024
  15. ReimarBauer commented on Aug 30, 2024

    @ReimarBauer

    On MSS it was reported 2.6.1 works with python 3.11.8 and 2.6.2 doesn't.

  16. jamesdalg commented on Sep 1, 2025

    @jamesdalg

    This is still a recurring issue, years on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions