Issue 19726: BaseProtocol is not an ABC (original) (raw)

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:54 admin set github: 63925
2013-12-01 02:33:29 Arfrever set versions: + Python 3.4, - Python 3.5
2013-12-01 02:17:39 ncoghlan set messages: -
2013-11-30 23:36:20 gvanrossum set status: open -> closedresolution: fixedstage: resolved
2013-11-30 23:35:52 python-dev set messages: +
2013-11-30 23:29:14 gvanrossum set messages: +
2013-11-30 11:13:07 pitrou set messages: +
2013-11-30 08:45:24 alexandre.vassalotti set messages: -
2013-11-30 08:37:36 Rhonda.Parker set nosy: + Rhonda.Parkermessages: + versions: + Python 3.5, - Python 3.4
2013-11-30 07:45:21 python-dev set nosy: + python-devmessages: +
2013-11-24 00:39:43 pitrou set messages: +
2013-11-24 00:38:50 gvanrossum set messages: +
2013-11-24 00:37:24 pitrou set messages: +
2013-11-23 22:55:30 gvanrossum set messages: +
2013-11-23 22:51:30 pitrou set messages: +
2013-11-22 23:47:50 gvanrossum set messages: +
2013-11-22 23:38:19 pitrou create