The Wayback Machine - https://web.archive.org/web/20220510145949/https://github.com/python/cpython/pull/28218
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

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 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
@rhettinger rhettinger requested a review from gvanrossum Sep 7, 2021
@ambv ambv removed the skip news label Sep 8, 2021
@rhettinger rhettinger requested a review from ambv Sep 9, 2021
@rhettinger rhettinger merged commit 62fa613 into python:main Sep 10, 2021
12 checks passed
@miss-islington
Copy link

@miss-islington miss-islington commented Sep 10, 2021

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

@miss-islington
Copy link

@miss-islington miss-islington commented Sep 10, 2021

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

@miss-islington
Copy link

@miss-islington miss-islington commented Sep 10, 2021

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

@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented Sep 10, 2021

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 issue Sep 10, 2021
…e collections ABCs (pythonGH-28218)

(cherry picked from commit 62fa613)

Co-authored-by: Raymond Hettinger <[email protected]>
rhettinger pushed a commit that referenced this issue Sep 10, 2021
@iritkatriel
Copy link

@iritkatriel iritkatriel commented Sep 10, 2021

I think this resolves bpo 35190 as well.

@iritkatriel
Copy link

@iritkatriel iritkatriel commented Sep 10, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA signed docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants