Skip to content

cElementTree & ElementTree use different exceptions for XML Errors #50514

Closed

Description

@NeilMuller
BPO 6265
Nosy @florentx
Superseder
  • bpo-6472: Update ElementTree with upstream changes
  • 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 = None
    closed_at = <Date 2010-03-11.15:00:15.219>
    created_at = <Date 2009-06-11.10:46:46.439>
    labels = ['type-bug']
    title = 'cElementTree & ElementTree use different exceptions for XML Errors'
    updated_at = <Date 2010-03-11.15:00:15.045>
    user = 'https://bugs.python.org/NeilMuller'

    bugs.python.org fields:

    activity = <Date 2010-03-11.15:00:15.045>
    actor = 'flox'
    assignee = 'none'
    closed = True
    closed_date = <Date 2010-03-11.15:00:15.219>
    closer = 'flox'
    components = []
    creation = <Date 2009-06-11.10:46:46.439>
    creator = 'Neil Muller'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 6265
    keywords = []
    message_count = 2.0
    messages = ['89247', '99406']
    nosy_count = 4.0
    nosy_names = ['effbot', 'Neil Muller', 'jerith', 'flox']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = '6472'
    type = 'behavior'
    url = 'https://bugs.python.org/issue6265'
    versions = ['Python 2.6', 'Python 3.1', 'Python 2.7', 'Python 3.2']

    Activity

    1. NeilMuller commented on Jun 11, 2009

      NeilMullermannequin
      MannequinAuthor

      cElementTree will raise a SyntaxError on XML parsing errors, while
      ElementTree will raise ExpatError. This makes changing between the two
      a bit more problematic than it could be. See for example
      https://lists.canonical.com/archives/bazaar/2006q3/017491.html

      ElementTree 1.3 raises a ParseError, which is subclassed from
      SyntaxError, which will improve the situation when it's merged, but
      cElementTree should be adjusted to raise the same error.

    2. florentx commented on Feb 16, 2010

      florentxmannequin
      Mannequin

      Should be fixed with upstream ElementTree 1.3/cElementTree 1.0.6.

      See issue bpo-6472.

    3. transferred this issue fromon Apr 10, 2022
    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

      type-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions