Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected instantiation behavior for xml.etree.ElementTree.XMLParser(target=None) #90106

Closed
rdsteed mannequin opened this issue Dec 1, 2021 · 6 comments
Closed

Unexpected instantiation behavior for xml.etree.ElementTree.XMLParser(target=None) #90106

rdsteed mannequin opened this issue Dec 1, 2021 · 6 comments
Labels
3.9 only security fixes 3.10 only security fixes 3.11 bug and security fixes extension-modules C modules in the Modules dir topic-XML type-bug An unexpected behavior, bug, or error

Comments

@rdsteed
Copy link
Mannequin

rdsteed mannequin commented Dec 1, 2021

BPO 45948
Nosy @scoder, @serhiy-storchaka, @miss-islington, @jacobtylerwalls
PRs
  • bpo-45948: Remove constructor discrepancy in C version of ElementTree.XMLParser #31152
  • [3.10] bpo-45948: Remove constructor discrepancy in C version of ElementTree.XMLParser (GH-31152) #31292
  • [3.9] bpo-45948: Remove constructor discrepancy in C version of ElementTree.XMLParser (GH-31152) #31299
  • Files
  • XMLParserFail.py: Commented example of unexpected behavior
  • 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 2022-02-13.00:17:02.114>
    created_at = <Date 2021-12-01.14:07:52.929>
    labels = ['expert-XML', 'type-bug', '3.9', '3.10', '3.11', 'extension-modules']
    title = 'Unexpected instantiation behavior for xml.etree.ElementTree.XMLParser(target=None)'
    updated_at = <Date 2022-02-13.00:17:02.112>
    user = 'https://bugs.python.org/rdsteed'

    bugs.python.org fields:

    activity = <Date 2022-02-13.00:17:02.112>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2022-02-13.00:17:02.114>
    closer = 'serhiy.storchaka'
    components = ['Extension Modules', 'XML']
    creation = <Date 2021-12-01.14:07:52.929>
    creator = 'rdsteed'
    dependencies = []
    files = ['50465']
    hgrepos = []
    issue_num = 45948
    keywords = ['patch']
    message_count = 6.0
    messages = ['407458', '412822', '412823', '413117', '413119', '413148']
    nosy_count = 6.0
    nosy_names = ['scoder', 'eli.bendersky', 'serhiy.storchaka', 'miss-islington', 'jacobtylerwalls', 'rdsteed']
    pr_nums = ['31152', '31292', '31299']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue45948'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    @rdsteed
    Copy link
    Mannequin Author

    rdsteed mannequin commented Dec 1, 2021

    Expected instantiation of xml.etree.ElementTree.XMLParser(target=None) to create a parser using default TreeBuilder

    @rdsteed rdsteed mannequin added 3.8 only security fixes topic-XML type-bug An unexpected behavior, bug, or error labels Dec 1, 2021
    @serhiy-storchaka serhiy-storchaka added extension-modules C modules in the Modules dir 3.9 only security fixes 3.10 only security fixes 3.11 bug and security fixes and removed 3.8 only security fixes labels Feb 8, 2022
    @scoder
    Copy link
    Contributor

    scoder commented Feb 8, 2022

    This is a backwards incompatible change, but unlikely to have a wide impact.

    I was thinking for a second if it's making the change in the right direction because it's not unreasonable to pass "None" for saying "I want no target". But it's documented this way and lxml does it the same, so I agree that this should be changed to make "None" behave the same as no argument.

    @serhiy-storchaka
    Copy link
    Member

    I do not think it is a backwards incompatible change, but concur with the rest said by Stefan.

    @serhiy-storchaka
    Copy link
    Member

    New changeset 168fd64 by Jacob Walls in branch 'main':
    bpo-45948: Remove constructor discrepancy in C version of ElementTree.XMLParser (GH-31152)
    168fd64

    @miss-islington
    Copy link
    Contributor

    New changeset b7a65c9 by Miss Islington (bot) in branch '3.10':
    bpo-45948: Remove constructor discrepancy in C version of ElementTree.XMLParser (GH-31152)
    b7a65c9

    @serhiy-storchaka
    Copy link
    Member

    New changeset cc6d8f8 by Jacob Walls in branch '3.9':
    [3.9] bpo-45948: Remove constructor discrepancy in C version of ElementTree.XMLParser (GH-31152) (GH-31299)
    cc6d8f8

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.9 only security fixes 3.10 only security fixes 3.11 bug and security fixes extension-modules C modules in the Modules dir topic-XML type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants