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

bpo-45024 and bpo-23864: Document how interface testing works with the collections ABCs #28218

Merged
merged 15 commits into from
Sep 10, 2021

Conversation

rhettinger
Copy link
Contributor

@rhettinger rhettinger commented Sep 7, 2021

To resolve long standing confusion, I've enumerated the three principal ways to test interfaces using the collections ABCs. For each, there are provided examples and explanation. Also added footnotes to the ABC table to indicate which ABCs can use hasattr() logic rather than direct subclassing or registration.

https://bugs.python.org/issue45024

@bedevere-bot bedevere-bot added the docs Documentation in the Doc dir label Sep 7, 2021
@rhettinger rhettinger changed the title Document how interface testing works with the collections ABCs bpo-45024 and bpo-23864: Document how interface testing works with the collections ABCs Sep 7, 2021
@ambv ambv removed the skip news label Sep 8, 2021
@rhettinger rhettinger requested a review from ambv September 9, 2021 02:59
@rhettinger rhettinger merged commit 62fa613 into python:main Sep 10, 2021
@miss-islington
Copy link
Contributor

Thanks @rhettinger for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry @rhettinger, I had trouble checking out the 3.10 backport branch.
Please backport using cherry_picker on command line.
cherry_picker 62fa613f6a6e872723505ee9d56242c31a654a9d 3.10

@rhettinger rhettinger added the needs backport to 3.10 only security fixes label Sep 10, 2021
@miss-islington
Copy link
Contributor

Thanks @rhettinger for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Sep 10, 2021
@bedevere-bot
Copy link

GH-28266 is a backport of this pull request to the 3.10 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 10, 2021
…e collections ABCs (pythonGH-28218)

(cherry picked from commit 62fa613)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
rhettinger pushed a commit that referenced this pull request Sep 10, 2021
@iritkatriel
Copy link
Member

I think this resolves bpo 35190 as well.

@iritkatriel
Copy link
Member

I think this resolves bpo 35190 as well.

Maybe not - there's a comment at the end there to register array.array as a Sequence.

pablogsal pushed a commit that referenced this pull request Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants