[issue23046] asyncio.BaseEventLoop is documented, but only exported via asyncio.base_events

2015-01-26 Thread STINNER Victor

STINNER Victor added the comment:

Since there is already an open issue suggesting to document AbstractServer (and 
Server), I close this issue.

The original bug was fixed: BaseEventLoop is now part of the asyncio namespace.

--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23046
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23046] asyncio.BaseEventLoop is documented, but only exported via asyncio.base_events

2015-01-09 Thread STINNER Victor

STINNER Victor added the comment:

See also the Documentation: document AbstractServer, Server.sockets is 
specific to asyncio event loops issue:
https://code.google.com/p/tulip/issues/detail?id=188

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23046
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23046] asyncio.BaseEventLoop is documented, but only exported via asyncio.base_events

2015-01-05 Thread Guido van Rossum

Guido van Rossum added the comment:

Sure. I already said LGTM on the patch 
(http://bugs.python.org/issue23046#msg232783).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23046
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23046] asyncio.BaseEventLoop is documented, but only exported via asyncio.base_events

2015-01-05 Thread STINNER Victor

STINNER Victor added the comment:

What do you think of my first change, base_event_loop.patch, which exposes 
BaseEventLoop? I'm going to commit it if nobody reviews it.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23046
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23046] asyncio.BaseEventLoop is documented, but only exported via asyncio.base_events

2015-01-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ddf6b78faed9 by Victor Stinner in branch '3.4':
Issue #23046: Expose the BaseEventLoop class in the asyncio namespace
https://hg.python.org/cpython/rev/ddf6b78faed9

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23046
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23046] asyncio.BaseEventLoop is documented, but only exported via asyncio.base_events

2014-12-16 Thread STINNER Victor

STINNER Victor added the comment:

I'm in favor of exposing BaseEventLoop in the asyncio namespace directly 
(asyncio.BaseEventLoop) because I'm using it in various asyncio projects, and I 
don't like having to use submodules. I consider asyncio.base_events as the 
private API.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23046
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23046] asyncio.BaseEventLoop is documented, but only exported via asyncio.base_events

2014-12-16 Thread Guido van Rossum

Guido van Rossum added the comment:

OK, fine to expose the BaseEventLoop class.

On Tue, Dec 16, 2014 at 3:45 PM, STINNER Victor rep...@bugs.python.org
wrote:


 STINNER Victor added the comment:

 I'm in favor of exposing BaseEventLoop in the asyncio namespace directly
 (asyncio.BaseEventLoop) because I'm using it in various asyncio projects,
 and I don't like having to use submodules. I consider asyncio.base_events
 as the private API.

 --

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue23046
 ___


--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23046
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23046] asyncio.BaseEventLoop is documented, but only exported via asyncio.base_events

2014-12-16 Thread STINNER Victor

STINNER Victor added the comment:

Here is a patch to expose BaseEventLoop. It removes Server from 
base_events.__all__, which means that from asyncio.base_events import * will 
no import Server anymore. Can it break real applications?

--
keywords: +patch
Added file: http://bugs.python.org/file37475/base_event_loop.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23046
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23046] asyncio.BaseEventLoop is documented, but only exported via asyncio.base_events

2014-12-16 Thread Guido van Rossum

Guido van Rossum added the comment:

Sounds unlikely. If they write from asyncio.base_events import Server it
will still work. Only if they wrote from asyncio.base_events import *
will they be broken, and that sounds not worth worrying about. So LGTM on
the patch. (But why was Server there at all? Tests?

On Tue, Dec 16, 2014 at 4:17 PM, STINNER Victor rep...@bugs.python.org
wrote:


 STINNER Victor added the comment:

 Here is a patch to expose BaseEventLoop. It removes Server from
 base_events.__all__, which means that from asyncio.base_events import *
 will no import Server anymore. Can it break real applications?

 --
 keywords: +patch
 Added file: http://bugs.python.org/file37475/base_event_loop.patch

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue23046
 ___


--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23046
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23046] asyncio.BaseEventLoop is documented, but only exported via asyncio.base_events

2014-12-16 Thread STINNER Victor

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 rep...@bugs.python.org
http://bugs.python.org/issue23046
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23046] asyncio.BaseEventLoop is documented, but only exported via asyncio.base_events

2014-12-16 Thread Guido van Rossum

Guido van Rossum added the comment:

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 rep...@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 rep...@bugs.python.org
 http://bugs.python.org/issue23046
 ___


--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23046
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23046] asyncio.BaseEventLoop is documented, but only exported via asyncio.base_events

2014-12-12 Thread Martin Panter

New submission from Martin Panter:

The documentation mentions BaseEventLoop as an attribute of the “asyncio” 
module, but it is not actually there (at least in v3.4.2). I have to import it 
specially from “asyncio.base_events”. Is this an oversight in the 
documentation, or am I relying on undocumented internals? I find the 
BaseEventLoop class is somewhat helpful for implementing my own event loops.

--
components: asyncio
messages: 232598
nosy: gvanrossum, haypo, vadmium, yselivanov
priority: normal
severity: normal
status: open
title: asyncio.BaseEventLoop is documented, but only exported via 
asyncio.base_events
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23046
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com