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

Issues with equality of inspect objects #68394

Closed
serhiy-storchaka opened this issue May 16, 2015 · 2 comments
Closed

Issues with equality of inspect objects #68394

serhiy-storchaka opened this issue May 16, 2015 · 2 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@serhiy-storchaka
Copy link
Member

BPO 24206
Nosy @serhiy-storchaka
Files
  • inspect_eq.patch
  • 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 = 'https://github.com/serhiy-storchaka'
    closed_at = <Date 2015-07-18.20:38:54.655>
    created_at = <Date 2015-05-16.09:54:36.705>
    labels = ['type-bug', 'library']
    title = 'Issues with equality of inspect objects'
    updated_at = <Date 2015-07-18.20:38:54.653>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2015-07-18.20:38:54.653>
    actor = 'serhiy.storchaka'
    assignee = 'serhiy.storchaka'
    closed = True
    closed_date = <Date 2015-07-18.20:38:54.655>
    closer = 'serhiy.storchaka'
    components = ['Library (Lib)']
    creation = <Date 2015-05-16.09:54:36.705>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = ['39388']
    hgrepos = []
    issue_num = 24206
    keywords = ['patch']
    message_count = 2.0
    messages = ['243303', '246912']
    nosy_count = 2.0
    nosy_names = ['python-dev', 'serhiy.storchaka']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue24206'
    versions = ['Python 3.4', 'Python 3.5', 'Python 3.6']

    @serhiy-storchaka
    Copy link
    Member Author

    There are issues with implementations of equality in inspect classes.

    1. __eq__ doesn't return NotImplemented. This causes that testing for equality with an instance of different classes always returns False, even when other class implements __eq__ that handles inspect class.

    2. __ne__ returns False if __eq__ returns NotImplemented (in subclass).

    3. All tests test only one of "==" or "!=" operations.

    Proposed patch fixes these issues.

    @serhiy-storchaka serhiy-storchaka added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels May 16, 2015
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jul 18, 2015

    New changeset 5ec2bfbe8115 by Serhiy Storchaka in branch '3.4':
    Issue bpo-24206: Fixed __eq__ and __ne__ methods of inspect classes.
    https://hg.python.org/cpython/rev/5ec2bfbe8115

    New changeset 66a5f66b4049 by Serhiy Storchaka in branch '3.5':
    Issue bpo-24206: Fixed __eq__ and __ne__ methods of inspect classes.
    https://hg.python.org/cpython/rev/66a5f66b4049

    New changeset adc9869c6d0d by Serhiy Storchaka in branch 'default':
    Issue bpo-24206: Fixed __eq__ and __ne__ methods of inspect classes.
    https://hg.python.org/cpython/rev/adc9869c6d0d

    @serhiy-storchaka serhiy-storchaka self-assigned this Jul 18, 2015
    @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
    stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant