GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — XML-related test failures · Issue #8083 · RustPython/RustPython

XML-related test failures #8083

New issue
Copy link
New issue
Copy link
Open
Open
XML-related test failures#8083
Copy link
Labels
C-compatA discrepancy between RustPython and CPythonA discrepancy between RustPython and CPython

Description

@fanninpm
fanninpm
opened on Jun 11, 2026
Issue body actions

I want to push more on getting RustPython's XML capabilities on par with CPython's, so we can replace extratests/json-tests.py with a more robust solution involving CPython's own test harness (the --junit-xml flag on python -m test). A lot of this may involve making the xml crate "behave" more like the libexpat parser. The goal is not to get all of these boxes checked, but to get enough of them checked such that, e.g., rustpython -m test --junit-xml test.xml tests.xmltests will output valid XML. Here's the current state of play (as of 14 June 2026):

Lib/test/test_minidom.py

  • class MinidomTest:
    • testGetElementsByTagNameNS()
    • testWriteXML() Implement pyexpat ordered_attributes #8305
    • testAltNewline() Implement pyexpat ordered_attributes #8305
    • testProcessingInstruction()
    • testProcessingInstructionRepr()
    • testRemoveNamedItem() Implement pyexpat ordered_attributes #8305
    • testRemoveNamedItemNS() Implement pyexpat ordered_attributes #8305
    • testCloneElementShallow() Implement pyexpat ordered_attributes #8305
    • testCloneAttributeShallow() Implement pyexpat ordered_attributes #8305
    • testCloneAttributeDeep() Implement pyexpat ordered_attributes #8305
    • testClonePIShallow()
    • testClonePIDeep()
    • testCloneNodeEntity()
    • testSiblings()
    • testEncodings()
    • testRenameAttribute() Implement pyexpat ordered_attributes #8305
    • testSchemaType() Implement pyexpat ordered_attributes #8305
    • testSetIdAttribute() Implement pyexpat ordered_attributes #8305
    • testSetIdAttributeNS() Implement pyexpat ordered_attributes #8305
    • testSetIdAttributeNode()
    • testExceptionOnSpacesInXMLNSValue()
    • test_minidom_attribute_order() Implement pyexpat ordered_attributes #8305
    • test_toxml_with_attributes_ordered() Implement pyexpat ordered_attributes #8305
    • test_toprettyxml_with_attributes_ordered() Implement pyexpat ordered_attributes #8305
    • test_toprettyxml_with_cdata()

Lib/test/test_pulldom.py

  • class ‎SAX2DOMTestCase:
    • test_basic() read from stream io
  • class PullDOMTestCase:
    • test_parse() FileNotFoundError: [Errno 2] No such file or directory (os error 2): 'xmltestdata/test.xml' -> 'None'
    • test_parse_semantics() implement DOM semantic
    • test_expandItem() pulldom.parseString(SMALL_SAMPLE) return iterator with tuple with 2 elements

Lib/test/test_pyexpat.py

  • class ParseTest:
    • test_parse_bytes()
    • test_parse_str()
    • test_parse_file()
    • test_parse_again()
    • test_supported_encodings()
    • test_supported_encodings2()
    • test_unsupported_encodings() AssertionError: ValueError not raised
    • test_incompatible_encodings() AssertionError: ExpatError not raised
    • test_non_text_encodings() AssertionError: LookupError not raised
    • test_undefined_encoding() AssertionError: UnicodeError not raised
    • test_unknown_encoding() AssertionError: LookupError not raised
  • class NamespaceSeparatorTest:
    • test_illegal()
  • class InterningTest:
    • test()
    • test_issue9402()
  • class BufferTextTest:
    • test_buffering_enabled()
    • test1()
    • test2()
    • test7()
  • class sf1296433Test:
    • test_parse_only_xml_data() TypeError: Expected type 'str' but 'bytes' found.
  • class ChardataBufferTest:
    • test_1025_bytes()
    • test_1000_bytes()
    • test_wrong_size()
    • test_unchanged_size()
    • test_disabling_buffer()
    • test_change_size_1()
    • test_change_size_2()
  • class ElementDeclHandlerTest:
    • test_trigger_leak() AssertionError: TypeError not raised by Parse
    • test_deeply_nested_content_model() AssertionError: RecursionError not raised
  • class MalformedInputTest:
    • test1()
    • test2()
  • class ErrorMessageTest:
    • test_codes()
    • test_expaterror()
  • class ForeignDTDTest:
    • test_use_foreign_dtd()
    • test_ignore_use_foreign_dtd()
  • class ParentParserLifetimeTest:
    • test_parent_parser_outlives_its_subparsers__single() AttributeError: 'xmlparser' object has no attribute 'ExternalEntityParserCreate'
    • test_parent_parser_outlives_its_subparsers__multiple() AttributeError: 'xmlparser' object has no attribute 'ExternalEntityParserCreate'
    • test_parent_parser_outlives_its_subparsers__chain() AttributeError: 'xmlparser' object has no attribute 'ExternalEntityParserCreate'
  • class ReparseDeferralTest:
    • test_getter_setter_round_trip() AttributeError: 'xmlparser' object has no attribute 'GetReparseDeferralEnabled'
    • test_reparse_deferral_enabled() AttributeError: 'xmlparser' object has no attribute 'GetReparseDeferralEnabled'
    • test_reparse_deferral_disabled() AttributeError: 'xmlparser' object has no attribute 'SetReparseDeferralEnabled'
  • class ExpansionProtectionTest: [N.B. this gets appended at the end of the current list]
    • test_set_activation_threshold__threshold_reached() AttributeError: 'xmlparser' object has no attribute 'SetBillionLaughsAttackProtectionMaximumAmplification'
    • test_set_activation_threshold__threshold_not_reached() AttributeError: 'xmlparser' object has no attribute 'SetBillionLaughsAttackProtectionMaximumAmplification'
    • test_set_maximum_amplification__amplification_exceeded() AttributeError: 'xmlparser' object has no attribute 'SetBillionLaughsAttackProtectionMaximumAmplification'
    • test_set_maximum_amplification__amplification_not_exceeded() AttributeError: 'xmlparser' object has no attribute 'SetBillionLaughsAttackProtectionMaximumAmplification'
    • test_set_activation_threshold__fail_for_subparser() AttributeError: 'xmlparser' object has no attribute 'SetBillionLaughsAttackProtectionMaximumAmplification'
    • test_set_activation_threshold__invalid_threshold_type() AttributeError: 'xmlparser' object has no attribute 'SetBillionLaughsAttackProtectionMaximumAmplification'
    • test_set_maximum_amplification__fail_for_subparser() AttributeError: 'xmlparser' object has no attribute 'SetBillionLaughsAttackProtectionMaximumAmplification'
    • test_set_maximum_amplification__infinity() AttributeError: 'xmlparser' object has no attribute 'SetBillionLaughsAttackProtectionMaximumAmplification'
    • test_set_maximum_amplification__invalid_max_factor_range() AttributeError: 'xmlparser' object has no attribute 'SetBillionLaughsAttackProtectionMaximumAmplification'
    • test_set_maximum_amplification__invalid_max_factor_type() AttributeError: 'xmlparser' object has no attribute 'SetBillionLaughsAttackProtectionMaximumAmplification'

Lib/test/test_sax.py

  • class ParseTest:
    • test_parse_text() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
    • test_parse_bytes() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
    • test_parse_path_object() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
    • test_parse_InputSource() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
    • test_parse_close_source() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
    • check_parseString() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
      N.B. erroneous?
    • test_parseString_text() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
    • test_parseString_bytes() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
  • class XmlGenTest:
    • test_5027_1() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
  • class ExpatReaderTest:
    • test_expat_binary_file() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
    • test_expat_text_file() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
    • test_expat_binary_file_nonascii() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
    • test_expat_binary_file_bytes_name() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
    • test_expat_binary_file_int_name() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
    • test_expat_dtdhandler_support() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
    • test_expat_external_dtd_enabled() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
    • test_expat_external_dtd_default() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
    • test_expat_entityresolver_enabled() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
    • test_expat_entityresolver_default() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
    • test_expat_attrs_empty() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
    • test_expat_attrs_wattr() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
    • test_expat_nsattrs_empty() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
    • test_expat_nsattrs_wattr() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
    • test_expat_inpsource_filename() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
    • test_expat_inpsource_sysid() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
    • test_expat_inpsource_sysid_nonascii() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
    • test_expat_inpsource_byte_stream() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
    • test_expat_inpsource_character_stream() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
    • test_expat_incremental() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
    • test_expat_incremental_reset() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
    • test_flush_reparse_deferral_enabled() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
    • test_flush_reparse_deferral_disabled() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
    • test_expat_locator_noinfo() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
    • test_expat_locator_withinfo() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
    • test_expat_locator_withinfo_nonascii() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
  • class ErrorReportingTest:
    • test_expat_inpsource_location() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
    • test_expat_incomplete() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
  • class LexicalHandlerTest:
    • test_handlers() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
  • class CDATAHandlerTest:
    • test_handlers() AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'

Lib/test/test_xml_dom_minicompat.py

No tests fail.

Lib/test/test_xml_dom_xmlbuilder.py

No tests fail.

Lib/test/test_xml_etree.py

  • class ElementTreeTest:
    • test_file_init() Implement pyexpat ordered_attributes #8305
    • test_parsefile() Implement pyexpat ordered_attributes #8305
    • test_parseliteral()
    • test_custom_builder()
    • test_custom_builder_only_end_ns()
    • test_children() Implement pyexpat ordered_attributes #8305
    • test_encoding()
    • test_entity()
    • test_namespace() Implement pyexpat ordered_attributes #8305
    • test_attlist_default()
  • class IterparseTest:
    • test_basic() Implement pyexpat ordered_attributes #8305
    • test_external_file() Implement pyexpat ordered_attributes #8305
    • test_events() Implement pyexpat ordered_attributes #8305
    • test_namespace_events()
    • test_non_utf8()
    • test_parsing_error()
    • test_resource_warnings_not_exhausted() Implement pyexpat ordered_attributes #8305
    • test_resource_warnings_failed_iteration()
    • test_close_not_exhausted() Implement pyexpat ordered_attributes #8305
  • class XMLPullParserTest:
    • test_simple_xml()
    • test_simple_xml_chunk_1()
    • test_simple_xml_chunk_5()
    • test_simple_xml_chunk_22()
    • test_feed_while_iterating()
    • test_simple_xml_with_ns()
    • test_ns_events()
    • test_ns_events_start()
    • test_ns_events_start_end()
    • test_events()
    • test_events_comment()
    • test_events_pi()
    • test_flush_reparse_deferral_enabled()
    • test_flush_reparse_deferral_disabled()
    • test_xinclude_default() Implement pyexpat ordered_attributes #8305
    • test_xinclude() Implement pyexpat ordered_attributes #8305
    • test_xinclude_repeated() Implement pyexpat ordered_attributes #8305
    • test_xinclude_failures() Implement pyexpat ordered_attributes #8305
  • class BugsTest:
    • test_bug_xmltoolkit25() Implement pyexpat ordered_attributes #8305
    • test_bug_xmltoolkit39() Implement pyexpat ordered_attributes #8305
    • test_bug_xmltoolkit55()
    • test_bug_xmltoolkit63()
    • test_bug_200708_newline() Implement pyexpat ordered_attributes #8305
    • test_issue6565() Implement pyexpat ordered_attributes #8305
    • test_lost_elem()
    • test_expat224_utf8_bug() Implement pyexpat ordered_attributes #8305
    • test_expat224_utf8_bug_file()
  • class BadElementTest:
    • test_deeply_nested_deepcopy()
  • class ElementFindTest:
    • test_find_simple() Implement pyexpat ordered_attributes #8305
    • test_find_xpath() Implement pyexpat ordered_attributes #8305
    • test_findall() Implement pyexpat ordered_attributes #8305
    • test_find_through_ElementTree() Implement pyexpat ordered_attributes #8305
  • class TreeBuilderTest:
    • test_late_tail_mix_pi_comments()
    • test_doctype()
  • class XMLParserTest:
    • test_subclass_doctype()
    • test_parse_string()
  • class ParseErrorTest:
    • test_error_position()
    • test_error_code()
  • class BoolTest:
    • test_warning() Implement pyexpat ordered_attributes #8305
  • class C14NTest:
    • test_simple_roundtrip()
    • test_c14n_exclusion()
    • test_xml_c14n2()

Lib/test/test_xml_etree_c.py

No tests fail.

Lib/test/test_xmlrpc.py

  • class XMLRPCTestCase:
    • test_dump_encoding()
    • test_loads_unsupported()
    • test_load_extension_types()
  • class SimpleServerTestCase:
    • test_client_encoding()
  • class SimpleServerEncodingTestCase:
    • test_server_encoding()
Reacted by Shahar Naveh and OkJa

Activity

  1. fanninpm
    added
    C-compatA discrepancy between RustPython and CPythonA discrepancy between RustPython and CPython
    on Jun 11, 2026
  2. ShaharNaveh commented on Jun 12, 2026

    @ShaharNaveh
    ShaharNaveh
    on Jun 12, 2026
    Contributor
    More actions

    so we can replace extratests/json-tests.py

    I like this initiative a lot!


    I'm considering pinning this issue, what do you think @youknowone ?

  3. fanninpm commented on Jun 12, 2026

    @fanninpm
    fanninpm
    on Jun 12, 2026
    ContributorAuthor
    More actions

    I'm considering pinning this issue

    Would you rather pin this issue or #7611? #7611 has a broader scope, and I expect that resolving everything on that list will take longer than resolving everything on this list.

  4. ShaharNaveh commented on Jun 12, 2026

    @ShaharNaveh
    ShaharNaveh
    on Jun 12, 2026
    Contributor
    More actions

    I'm considering pinning this issue

    Would you rather pin this issue or #7611? #7611 has a broader scope, and I expect that resolving everything on that list will take longer than resolving everything on this list.

    That's a valid point. I'll do that

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

    C-compatA discrepancy between RustPython and CPythonA discrepancy between RustPython and CPython

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.