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

add support for != (not-equals) in ElementTree XPath #84804

Closed
anntzer mannequin opened this issue May 14, 2020 · 3 comments
Closed

add support for != (not-equals) in ElementTree XPath #84804

anntzer mannequin opened this issue May 14, 2020 · 3 comments
Labels
3.10 only security fixes topic-XML type-feature A feature request or enhancement

Comments

@anntzer
Copy link
Mannequin

anntzer mannequin commented May 14, 2020

BPO 40624
Nosy @scoder, @ammaraskar, @remilapeyre
PRs
  • bpo-40624: Add support for the XPath != operator in xml.etree #22147
  • 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 2020-11-09.07:04:04.713>
    created_at = <Date 2020-05-14.11:25:02.141>
    labels = ['expert-XML', 'type-feature', '3.10']
    title = 'add support for != (not-equals) in ElementTree XPath'
    updated_at = <Date 2020-11-09.12:44:10.111>
    user = 'https://github.com/anntzer'

    bugs.python.org fields:

    activity = <Date 2020-11-09.12:44:10.111>
    actor = 'Antony.Lee'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-11-09.07:04:04.713>
    closer = 'scoder'
    components = ['XML']
    creation = <Date 2020-05-14.11:25:02.141>
    creator = 'Antony.Lee'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 40624
    keywords = ['patch']
    message_count = 3.0
    messages = ['368829', '376544', '380572']
    nosy_count = 3.0
    nosy_names = ['scoder', 'ammar2', 'remi.lapeyre']
    pr_nums = ['22147']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue40624'
    versions = ['Python 3.10']

    @anntzer
    Copy link
    Mannequin Author

    anntzer mannequin commented May 14, 2020

    It would be a small usability improvement if ElementTree's XPath support also supported the != (not-equals) operator.
    I am specifically mentioning only != and not >/</... because != can be defined as the opposite of =, whereas other operators appear to run into questions of what to do with coercion of strings to numbers, etc. (I guess that depends on the version of XPath, which may be a question we want to avoid for now.)

    @anntzer anntzer mannequin added 3.9 only security fixes topic-XML labels May 14, 2020
    @scoder
    Copy link
    Contributor

    scoder commented Sep 8, 2020

    Agreed that adding "!=" would be a nice improvement, probably not very invasive. PR welcome.

    https://www.w3.org/TR/xpath-10/#booleans

    @scoder scoder added 3.10 only security fixes type-feature A feature request or enhancement and removed 3.9 only security fixes labels Sep 8, 2020
    @scoder
    Copy link
    Contributor

    scoder commented Nov 9, 2020

    New changeset 97e8b1e by Ammar Askar in branch 'master':
    bpo-40624: Add support for the XPath != operator in xml.etree (GH-22147)
    97e8b1e

    @scoder scoder closed this as completed Nov 9, 2020
    @scoder scoder closed this as completed Nov 9, 2020
    @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.10 only security fixes topic-XML type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant