Skip to content

ElementTree/cElementTree findtext inconsistency #46110

Closed

Description

@gmonroe
mannequin
BPO 1777
Nosy @loewis, @florentx
Superseder
  • bpo-6472: Update ElementTree with upstream changes
  • Files
  • etree_test.py: a simple example demonstrating the inconsistency
  • 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-02-16.11:46:13.625>
    created_at = <Date 2008-01-09.18:58:06.836>
    labels = ['type-bug', 'library']
    title = 'ElementTree/cElementTree findtext inconsistency'
    updated_at = <Date 2010-02-16.11:46:13.623>
    user = 'https://bugs.python.org/gmonroe'

    bugs.python.org fields:

    activity = <Date 2010-02-16.11:46:13.623>
    actor = 'flox'
    assignee = 'effbot'
    closed = True
    closed_date = <Date 2010-02-16.11:46:13.625>
    closer = 'flox'
    components = ['Library (Lib)']
    creation = <Date 2008-01-09.18:58:06.836>
    creator = 'gmonroe'
    dependencies = []
    files = ['9115']
    hgrepos = []
    issue_num = 1777
    keywords = []
    message_count = 5.0
    messages = ['59618', '59620', '59621', '79561', '99396']
    nosy_count = 4.0
    nosy_names = ['loewis', 'effbot', 'gmonroe', 'flox']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = None
    status = 'closed'
    superseder = '6472'
    type = 'behavior'
    url = 'https://bugs.python.org/issue1777'
    versions = ['Python 2.5']

    Activity

    1. gmonroe commented on Jan 9, 2008

      gmonroemannequin
      MannequinAuthor

      cElementTree findtext seems to return None when it should return a string.

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-bugAn unexpected behavior, bug, or error
      on Jan 9, 2008
    3. loewis commented on Jan 9, 2008

      loewismannequin
      Mannequin

      Fredrik, can you take a look?

    4. effbot commented on Jan 9, 2008

      effbotmannequin
      Mannequin

      Looks like the mechanisms used decide when to invoke the full
      ElementPath machinery differs somewhat. I've added this to the TODO
      list for ET 1.3; in the meantime, my advice is "don't do that".

      (adding a check for '.' to the PATHCHAR macro should fix this, I think.)

    5. effbot commented on Jan 10, 2009

      effbotmannequin
      Mannequin

      Forgot to mention that this is fixed in the cElementTree trunk (public
      as of today's 1.0.6 preview release). Will merge with Python trunk when
      I find the time...

    6. florentx commented on Feb 16, 2010

      florentxmannequin
      Mannequin

      Should be fixed with the next upstream merge. See bpo-6472

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

      stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions