Skip to content

gh-85572: Remove references to nonexisting __ne__ methods #21628

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Jul 26, 2020

@rhettinger
Copy link
Contributor

I prefer the tables as-is. The _ne_ method does exist; it has just been moved farther along the _mro_. From a user's point of view, the method still flows automatically from the abstract methods.

@serhiy-storchaka
Copy link
Member Author

serhiy-storchaka commented Jul 28, 2020

There are several methods which "exist" because they are inherited from the object class.

>>> sorted(set(object.__dict__) - set(collections.abc.Mapping.__dict__))
['__class__', '__delattr__', '__dir__', '__format__', '__ge__', '__getattribute__', '__gt__', '__init__', '__init_subclass__', '__le__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__']

But there are no __lt__, __reduce__ or __format__ in the table.

I now think that it would be better to keep __ne__ in the table, but change the code (bpo-41416).

@hugovk
Copy link
Member

hugovk commented Jan 29, 2022

I now think that it would be better to keep __ne__ in the table, but change the code (bpo-41416).

@serhiy-storchaka So shall we close this PR (and bpo-41400) in favour of doing bpo-41416 instead?

Copy link
Member

@iritkatriel iritkatriel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has merge conflicts.

@bedevere-bot
Copy link

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

@hugovk hugovk removed the needs backport to 3.10 only security fixes label Apr 7, 2023
@erlend-aasland erlend-aasland changed the title bpo-41400: Remove references to nonexisting __ne__ methods gh-85572: Remove references to nonexisting __ne__ methods Jan 5, 2024
@hugovk hugovk added needs backport to 3.12 only security fixes and removed needs backport to 3.11 only security fixes labels Apr 11, 2024
@serhiy-storchaka serhiy-storchaka added the needs backport to 3.13 bugs and security fixes label May 9, 2024
@hugovk hugovk removed the needs backport to 3.12 only security fixes label Apr 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting changes docs Documentation in the Doc dir needs backport to 3.13 bugs and security fixes skip news
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

8 participants