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 notes maintaining ABCs #92736

Merged
merged 4 commits into from May 12, 2022
Merged

Add notes maintaining ABCs #92736

merged 4 commits into from May 12, 2022

Conversation

rhettinger
Copy link
Contributor

@rhettinger rhettinger commented May 12, 2022

We have a recurring issue where new maintainers aspire to modify the ABCs without understanding the implications. Adding some notes for the ABC maintenance facts-of-life.

# Though irritating, the correct procedure for adding new abstract or
# mixin methods is to create a new class as a subclass of the previous
# class. For example, union(), intersection(), and difference() cannot
Copy link
Member

@gvanrossum gvanrossum May 12, 2022

Choose a reason for hiding this comment

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

I'd replace "class" with "ABC" in both occurrences in this sentence, assuming that's what you meant.

Copy link
Contributor Author

@rhettinger rhettinger May 12, 2022

Choose a reason for hiding this comment

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

Will do.

#
# Though classes that inherit from an ABC would automatically receive a
# new mixin method, registered classes would become non-compliant and
# violate the contract promised by ``isinstance(someobj, SomeABC)``.
Copy link
Member

@gvanrossum gvanrossum May 12, 2022

Choose a reason for hiding this comment

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

Ditto.

Copy link
Contributor Author

@rhettinger rhettinger May 12, 2022

Choose a reason for hiding this comment

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

Will do.

Copy link
Member

@gvanrossum gvanrossum left a comment

Let's hope this will help!

@rhettinger rhettinger merged commit a834e2d into main May 12, 2022
12 checks passed
@rhettinger rhettinger deleted the abc_maintenance_notes branch May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs skip issue skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants