You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Expose error code XML_ERROR_NOT_STARTED of Expat >=2.6.4 #126624
The error code was introduced by a security fix (at libexpat/libexpat@51c7019) but the XML_StopParser C-API is not exposed through CPython yet so it should not be possible to encounter such error. In particular, exposing the error code can be considered a feature or postpone until #59979 is resolved.
CPython versions tested on:
3.9, 3.10, 3.11, 3.12, 3.13, 3.14, CPython main branch
changed the title [-]Please expose the new error code `XML_ERROR_NOT_STARTED` of Expat >=2.6.4[/-][+]Please expose error code `XML_ERROR_NOT_STARTED` of Expat >=2.6.4[/+]on Nov 9, 2024
@hartwork Is this one needed for security reasons or bug fixes? (I assumed no, hence the "feature request"). Depending on your answer, we would need to backport it.
@picnixz it was introduced by a security fix (at libexpat/libexpat@51c7019). I would like to vote for backporting because the underlying Expat is moving and hence could start producing that error code and distros will be backporting the security fix. I can help with the backport as needed. What do you think?
In general, we have a strict policy of what we backport and when. Bug fixes are backported up to the oldstable version (3.12) while security fixes are backported to all security branches (3.9+).
could start producing that error code
If it can produce that error code and can be reachable from Python (not C) code, then I think it makes sense to backport it as far as #126623 is backported. Having had a look at your PR, I think it can be reachable from pure Python code (namely the user can see such error). So I'll categorize this one as a security issue as well (not strictly a security issue, just that it's a follow-up to #126623).
I can help with the backport as needed
I don't think it'll be needed since the bot will likely handle them if there's no conflict. If there are conflicts, they'll likely be easy to fix (if not, you can definitely help).
changed the title [-]Please expose error code `XML_ERROR_NOT_STARTED` of Expat >=2.6.4[/-][+]Expose error code `XML_ERROR_NOT_STARTED` of Expat >=2.6.4[/+]on Nov 9, 2024
Activity
[-]Please expose the new error code `XML_ERROR_NOT_STARTED` of Expat >=2.6.4[/-][+]Please expose error code `XML_ERROR_NOT_STARTED` of Expat >=2.6.4[/+]picnixz commentedon Nov 9, 2024
@hartwork Is this one needed for security reasons or bug fixes? (I assumed no, hence the "feature request"). Depending on your answer, we would need to backport it.
hartwork commentedon Nov 9, 2024
@picnixz it was introduced by a security fix (at libexpat/libexpat@51c7019). I would like to vote for backporting because the underlying Expat is moving and hence could start producing that error code and distros will be backporting the security fix. I can help with the backport as needed. What do you think?
picnixz commentedon Nov 9, 2024
In general, we have a strict policy of what we backport and when. Bug fixes are backported up to the oldstable version (3.12) while security fixes are backported to all security branches (3.9+).
If it can produce that error code and can be reachable from Python (not C) code, then I think it makes sense to backport it as far as #126623 is backported. Having had a look at your PR, I think it can be reachable from pure Python code (namely the user can see such error). So I'll categorize this one as a security issue as well (not strictly a security issue, just that it's a follow-up to #126623).
I don't think it'll be needed since the bot will likely handle them if there's no conflict. If there are conflicts, they'll likely be easy to fix (if not, you can definitely help).
[-]Please expose error code `XML_ERROR_NOT_STARTED` of Expat >=2.6.4[/-][+]Expose error code `XML_ERROR_NOT_STARTED` of Expat >=2.6.4[/+]5 remaining items
hartwork commentedon Nov 9, 2024
@picnixz I learned something in the process, no worries. Thanks for the discussion.
gh-126624: Expose error code ``XML_ERROR_NOT_STARTED`` of Expat >=2.6…
Eclips4 commentedon Jan 2, 2025
Thank you @hartwork!
pythongh-126624: Expose error code ``XML_ERROR_NOT_STARTED`` of Expat…
SoeAung95 commentedon Jan 27, 2025
enum XML_Status XMLCALL
XML_ResumeParser(XML_Parser p);
SoeAung95 commentedon Jan 27, 2025
enum XML_Status XMLCALL
XML_ResumeParser(XML_Parser p);