Message232787
Heh. Well I don't remember why I did that any more, and it doesn't seem to
matter now.
However the doc issue seems different than for BaseEventLoop -- Server is
the *concrete* class (it actually gets instantiated, not a subclass). We
could instead document the AbstractServer class, but it doesn't have the
'sockets' instance variable. Maybe we should document both --
AbstractServer as the minimal interface that create_server() returns,
Server as the actual class that the default event loops (Unix and Windows)
create. With a warning that 'sockets' attribute may not be available if the
event loop has been configured differently.
On Tue, Dec 16, 2014 at 4:27 PM, STINNER Victor <report@bugs.python.org>
wrote:
>
>
> STINNER Victor added the comment:
>
> > why was Server there at all? Tests?
>
> If you cannot answer, who can answer? :-)
> https://code.google.com/p/tulip/source/detail?r=f136c04d82c0 (You
> added Server to __all__.)
>
> I don't see any use case which needs to create explicitly a Server
> class. There are the create_server() method and start_server()
> function for that.
>
> By the way, the Server class *is* documented as asyncio.Server, which
> is the same mistake than asyncio.BaseEventLoop:
> https://docs.python.org/dev/library/asyncio-eventloop.html#asyncio.Server
>
> I propose to update the doc for Server, replace asyncio.Server with
> asyncio.base_events.Server.
>
> ----------
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue23046>
> _______________________________________
> |
|
Date |
User |
Action |
Args |
2014-12-17 00:39:30 | gvanrossum | set | recipients:
+ gvanrossum, vstinner, martin.panter, yselivanov |
2014-12-17 00:39:30 | gvanrossum | link | issue23046 messages |
2014-12-17 00:39:30 | gvanrossum | create | |
|