This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: BaseProtocol is not an ABC
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: gvanrossum Nosy List: Rhonda.Parker, gvanrossum, pitrou, python-dev
Priority: normal Keywords:

Created on 2013-11-22 23:38 by pitrou, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (10)
msg203921 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-11-22 23:38
BaseProtocol docstring describes it as an "ABC for base protocol class", but it is not actually an ABC in the technical sense.
msg203926 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2013-11-22 23:47
Good question. I don't mind making these ABCs, but I don't think it's necessary to do it before beta1 (since it won't matter for most people).
msg204123 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-11-23 22:51
I don't think it's necessary either. They don't *need* to be ABCs, but if they aren't the docstring should be fixed :)
msg204125 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2013-11-23 22:55
I'm not sure that "ABC" implies "an instance of abc.ABC". It's still an abstract base class (in the usual definition of that concept) even if it doesn't enforce anything.

I propose to close this as wontfix.
msg204137 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-11-24 00:37
Well, IMHO it's better spelt "base class" if it isn't technically an ABC. At least I was personally a bit surprised at first.
msg204138 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2013-11-24 00:38
Well, it *is* abstract because it has no implementations and all the
methods raise NotImplementedError. We can do better in the .rst docs though.
msg204139 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-11-24 00:39
> Well, it *is* abstract because it has no implementations and all the
> methods raise NotImplementedError. We can do better in the .rst docs though.

I didn't know what to do with it, so I didn't mention it at all in
the .rst docs :-)
msg204801 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-11-30 11:13
> Well, it *is* abstract because it has no implementations and all the
> methods raise NotImplementedError.

Hmm, actually, the methods don't raise NotImplementedError, they just have default empty implementations.
msg204859 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2013-11-30 23:29
You're right, I commented previously without reading the context.  The classes defined in protocol.py are not ABCs, they are just base classes (and not mandatory, just convenient, because the transport *will* assume all methods are implemented, and call them without checking or catching NotImplementedError).  I will correct the docstrings.
msg204860 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-11-30 23:35
New changeset 5469e1a68dbd by Guido van Rossum in branch 'default':
asyncio: Use Interface instead of ABC.  Fixes issue 19726.
http://hg.python.org/cpython/rev/5469e1a68dbd
History
Date User Action Args
2022-04-11 14:57:54adminsetgithub: 63925
2013-12-01 02:33:29Arfreversetversions: + Python 3.4, - Python 3.5
2013-12-01 02:17:39ncoghlansetmessages: - msg204783
2013-11-30 23:36:20gvanrossumsetstatus: open -> closed
resolution: fixed
stage: resolved
2013-11-30 23:35:52python-devsetmessages: + msg204860
2013-11-30 23:29:14gvanrossumsetmessages: + msg204859
2013-11-30 11:13:07pitrousetmessages: + msg204801
2013-11-30 08:45:24alexandre.vassalottisetmessages: - msg204785
2013-11-30 08:37:36Rhonda.Parkersetnosy: + Rhonda.Parker

messages: + msg204785
versions: + Python 3.5, - Python 3.4
2013-11-30 07:45:21python-devsetnosy: + python-dev
messages: + msg204783
2013-11-24 00:39:43pitrousetmessages: + msg204139
2013-11-24 00:38:50gvanrossumsetmessages: + msg204138
2013-11-24 00:37:24pitrousetmessages: + msg204137
2013-11-23 22:55:30gvanrossumsetmessages: + msg204125
2013-11-23 22:51:30pitrousetmessages: + msg204123
2013-11-22 23:47:50gvanrossumsetmessages: + msg203926
2013-11-22 23:38:19pitroucreate