homepage

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: Document asyncio.AbstractEventLoop, not asyncio.BaseEventLoop
Type: behavior Stage: resolved
Components: Documentation Versions: Python 3.6, Python 3.4, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: gvanrossum Nosy List: gvanrossum, python-dev, vstinner, yselivanov
Priority: normal Keywords: patch

Created on 2016年08月06日 16:42 by gvanrossum, last changed 2022年04月11日 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
Base2Abstract.diff gvanrossum, 2016年08月08日 16:46 review
Messages (8)
msg272101 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2016年08月06日 16:42
The asyncio docs currently document the event loop interface as belonging to BaseEventLoop. But the intention of PEP 3156 was for the interface to belong to AbstractEventLoop. In typeshed we ended up exporting only AbstractEventLoop, but this runs into trouble when type-checking code written against the asyncio docs in the CPython repo rather against the PEP.
Unless there's a serious objection I would like to see the docs changed to match the PEP here, and switch from BaseEventLoop to AbstractEventLoop.
Thoughts?
msg272102 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2016年08月06日 16:44
Cross-reference: this came up in https://github.com/python/typeshed/issues/452 
msg272103 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2016年08月06日 16:59
I think we should fix this. BaseEventLoop is just an implementation detail of asyncio (I think we shouldn't have exposed it in asyncio.__all__ at all).
msg272180 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2016年08月08日 16:43
Here's a tentative diff. I did a global replace BaseEventLoop -> AbstractEventLoop and added an entry for BaseEventLoop (just above AbstractEventLoop) explaining that it should not be used. Please review for obvious mistakes.
msg272191 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2016年08月08日 21:01
The patch looks good.
I have a question: do we actually want to document BaseEventLoop? It's not a user-facing class, and the knowledge that it exists doesn't add to anything IMO.
msg272193 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2016年08月08日 21:37
The reason I kept some mention of BaseEventLoop is just that until now it
was the only thing documented and people might have references to it. It
would be good if searching for BaseEventLoop took them to a section
explaining they shouldn't use it, rather than just mysteriously failing to
turn up any search results at all.
And given that it *is* the base class I think we can't mark it as
deprecated (and I don't think that's needed yet).
msg272194 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2016年08月08日 21:39
Fair enough. I don't have any other questions about the patch.
msg272195 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016年08月08日 21:44
New changeset 87e3a58ed3c3 by Guido van Rossum in branch '3.5':
Issue #27700: Document AbstractEventLoop, not BaseEventLoop.
https://hg.python.org/cpython/rev/87e3a58ed3c3
New changeset d69f782d642d by Guido van Rossum in branch 'default':
Issue #27700: Document AbstractEventLoop, not BaseEventLoop. (Merge 3.5->3.6)
https://hg.python.org/cpython/rev/d69f782d642d 
History
Date User Action Args
2022年04月11日 14:58:34adminsetgithub: 71887
2016年08月08日 21:44:42gvanrossumsetstage: patch review -> resolved
2016年08月08日 21:44:32gvanrossumsetstatus: open -> closed
resolution: fixed
2016年08月08日 21:44:13python-devsetnosy: + python-dev
messages: + msg272195
2016年08月08日 21:39:52yselivanovsetmessages: + msg272194
2016年08月08日 21:37:04gvanrossumsetmessages: + msg272193
2016年08月08日 21:01:17yselivanovsetmessages: + msg272191
2016年08月08日 20:56:20gvanrossumsetstage: needs patch -> patch review
2016年08月08日 16:46:58gvanrossumsetmessages: - msg272183
2016年08月08日 16:46:40gvanrossumsetmessages: - msg272182
2016年08月08日 16:46:27gvanrossumsetfiles: + Base2Abstract.diff
keywords: + patch
messages: + msg272183
2016年08月08日 16:45:10gvanrossumsetmessages: + msg272182
2016年08月08日 16:44:38gvanrossumsetmessages: - msg272181
2016年08月08日 16:44:05gvanrossumsetmessages: + msg272181
2016年08月08日 16:43:11gvanrossumsetmessages: + msg272180
2016年08月06日 16:59:10yselivanovsetmessages: + msg272103
2016年08月06日 16:44:51gvanrossumsetmessages: + msg272102
2016年08月06日 16:42:59gvanrossumcreate

AltStyle によって変換されたページ (->オリジナル) /