[issue34344] Fix the docstring for AbstractEventLoopPolicy.get_event_loop

2019-12-01 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Closing this as fixed. Thanks.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue34344] Fix the docstring for AbstractEventLoopPolicy.get_event_loop

2019-12-01 Thread Ido Michael


Ido Michael  added the comment:

@yselivanov

Can we close this?

--

___
Python tracker 

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



[issue34344] Fix the docstring for AbstractEventLoopPolicy.get_event_loop

2019-10-15 Thread Ned Deily


Ned Deily  added the comment:


New changeset 88204a3908663a574919f9c17278bcabed0598fa by Ned Deily (Miss 
Islington (bot)) in branch '3.7':
bpo-34344 Fix AbstractEventLoopPolicy.get_event_loop docstring (GH-16463)
https://github.com/python/cpython/commit/88204a3908663a574919f9c17278bcabed0598fa


--
nosy: +ned.deily

___
Python tracker 

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



[issue34344] Fix the docstring for AbstractEventLoopPolicy.get_event_loop

2019-10-03 Thread miss-islington


miss-islington  added the comment:


New changeset 4de3fbe27f672dcd9c24d3e99258f39b12c365a5 by Miss Islington (bot) 
in branch '3.7':
bpo-34344 Fix AbstractEventLoopPolicy.get_event_loop docstring (GH-16463)
https://github.com/python/cpython/commit/4de3fbe27f672dcd9c24d3e99258f39b12c365a5


--

___
Python tracker 

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



[issue34344] Fix the docstring for AbstractEventLoopPolicy.get_event_loop

2019-10-03 Thread miss-islington


miss-islington  added the comment:


New changeset 8edde5caabc611c6320fd104244abe3a409cf0b6 by Miss Islington (bot) 
in branch '3.8':
bpo-34344 Fix AbstractEventLoopPolicy.get_event_loop docstring (GH-16463)
https://github.com/python/cpython/commit/8edde5caabc611c6320fd104244abe3a409cf0b6


--
nosy: +miss-islington

___
Python tracker 

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



[issue34344] Fix the docstring for AbstractEventLoopPolicy.get_event_loop

2019-10-03 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16160
pull_request: https://github.com/python/cpython/pull/16569

___
Python tracker 

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



[issue34344] Fix the docstring for AbstractEventLoopPolicy.get_event_loop

2019-10-03 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16159
pull_request: https://github.com/python/cpython/pull/16568

___
Python tracker 

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



[issue34344] Fix the docstring for AbstractEventLoopPolicy.get_event_loop

2019-10-03 Thread Yury Selivanov


Yury Selivanov  added the comment:


New changeset b23a8423a923077e4f83d3f328bb7542b4c940ed by Yury Selivanov 
(idomic) in branch 'master':
bpo-34344 Fix AbstractEventLoopPolicy.get_event_loop docstring (GH-16463)
https://github.com/python/cpython/commit/b23a8423a923077e4f83d3f328bb7542b4c940ed


--

___
Python tracker 

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



[issue34344] Fix the docstring for AbstractEventLoopPolicy.get_event_loop

2019-09-28 Thread Ido Michael


Ido Michael  added the comment:

I've fixed the documentation according to the thread.

Here's the PR: GH-16463

Ido

--
nosy: +Ido Michael

___
Python tracker 

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



[issue34344] Fix the docstring for AbstractEventLoopPolicy.get_event_loop

2019-09-28 Thread Ido Michael


Change by Ido Michael :


--
keywords: +patch
pull_requests: +16048
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/16463

___
Python tracker 

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



[issue34344] Fix the docstring for AbstractEventLoopPolicy.get_event_loop

2019-09-13 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Vlad, the PR is very welcome!

--

___
Python tracker 

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



[issue34344] Fix the docstring for AbstractEventLoopPolicy.get_event_loop

2019-09-12 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks for the report. This looks like a valid change to me as I can see from 
the docstring it says it can be None but in the source code there is an 
explicit check that if self._local._loop which is returned is None then raise a 
RuntimeError. I would propose removing the docstring in the example.


# Docstring says can be None

./python.exe -m pydoc asyncio.events.BaseDefaultEventLoopPolicy.get_event_loop 
| cat
Help on function get_event_loop in asyncio.events.BaseDefaultEventLoopPolicy:

asyncio.events.BaseDefaultEventLoopPolicy.get_event_loop = get_event_loop(self)
Get the event loop.

This may be None or an instance of EventLoop.


# RuntimeError is raised for None

./python.exe -m inspect asyncio.events:BaseDefaultEventLoopPolicy.get_event_loop
def get_event_loop(self):
"""Get the event loop.

This may be None or an instance of EventLoop.
"""
if (self._local._loop is None and
not self._local._set_called and
isinstance(threading.current_thread(), threading._MainThread)):
self.set_event_loop(self.new_event_loop())

if self._local._loop is None:
raise RuntimeError('There is no current event loop in thread %r.'
   % threading.current_thread().name)

return self._local._loop

--
versions: +Python 3.9 -Python 3.6

___
Python tracker 

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



[issue34344] Fix the docstring for AbstractEventLoopPolicy.get_event_loop

2018-09-20 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue34344] Fix the docstring for AbstractEventLoopPolicy.get_event_loop

2018-08-06 Thread Vlad Starostin


New submission from Vlad Starostin :

The docstring says "This may be None or an instance of EventLoop". But docs 
explicitly state that get_event_loop "must never return None". The same 
docstring is also in the example in docs: 
https://docs.python.org/3.6/library/asyncio-eventloops.html#customizing-the-event-loop-policy

I propose changing it to:

def get_event_loop(self):
"""Get the event loop.

Returns an instance of EventLoop or raises an exception.
"""

If the wording is ok, I'll make a PR.

--
assignee: docs@python
components: Documentation, asyncio
messages: 323190
nosy: asvetlov, docs@python, drtyrsa, yselivanov
priority: normal
severity: normal
status: open
title: Fix the docstring for AbstractEventLoopPolicy.get_event_loop
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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