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
issue9453.py: Test case that demonstrates reported bug
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=Nonecreated_at=<Date2010-08-02.10:49:16.664>labels= ['expert-XML', 'type-bug', '3.10']
title="pulldom.SAX2DOM Doesn't support processing instructions before the root element"updated_at=<Date2020-10-28.02:27:18.793>user='https://bugs.python.org/marksmith'
pulldom.SAX2DOM raises a TypeError if it encounters a processing instruction before the root element of an XML document.
It is valid to have a processing instruction before the root node of a document (and SAX2DOM's superclass, PullDOM supports this), so this behaviour is invalid.
I've encountered this bug while writing unit tests for pulldom (bpo-9373), so I've added this as an @expectedFailure, to be submitted as a patch for that ticket.
My recommendation is that SAX2DOM is deprecated and removed from the standard library rather than fixing this issue. The class is currently undocumented, has weird behaviour, and is unused within the Python standard library, so I don't expect that this will cause undue pain.
This test case demonstrates that the issue still exists in 3.8. The fix is relatively simple but I am unsure whether it is worthwhile as the original comments on the quality and usability of SAX2DOM are spot on. My recommendation would be to mark it as pending and close it at the end of a month if no-one submits a fix.
Proposing removal of SAX2DOM doesn't seem unreasonable to me. However, considering it hasn't been removed so far, we'll need good reason to do so since that would break backwards compatibility.
Jonathan, if the solution to this is simple, I say go for it and make a PR.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: