[issue45099] asyncio.Task's documentation says that loop arg is removed when it's not
New submission from jack1142 <kuba.kuczys@gmail.com>: The documentation here: https://docs.python.org/3.10/library/asyncio-task.html#asyncio.Task Says that `loop` parameter was removed but it's still part of the signature. It gets even more confusing when the deprecation right below it is saying that *not* passing it when there is no running event loop is deprecated :) I could make a PR removing this information but I'm not sure whether there should be also some information put about it being deprecated in 3.8 but not actually getting removed in 3.10? ---------- assignee: docs@python components: Documentation messages: 401047 nosy: docs@python, jack1142 priority: normal severity: normal status: open title: asyncio.Task's documentation says that loop arg is removed when it's not type: behavior versions: Python 3.10 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45099> _______________________________________
Change by jack1142 <kuba.kuczys@gmail.com>: ---------- components: +asyncio nosy: +asvetlov, yselivanov _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45099> _______________________________________
Andrew Svetlov <andrew.svetlov@gmail.com> added the comment: User code should not create Task objects explicitly. Please use `asyncio.create_task()` (or shiny new TaskGroup.create_task()) instead. They doesn't have 'loop' argument. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45099> _______________________________________
jack1142 <kuba.kuczys@gmail.com> added the comment: I'm aware, I'm reporting this because as long as the instantiation of a Task is documented, the documentation should still contain accurate up-to-date information. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45099> _______________________________________
Andrew Svetlov <andrew.svetlov@gmail.com> added the comment: I have a feeling that we need a low-level API section that describes *supported* API that is intended to task extenders only (guys who want to provide an alternative task factory for example). I love to contribute but not sure when I can find time for this docs change. Please feel free to provide a pull request. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45099> _______________________________________
Change by Andrew Svetlov <andrew.svetlov@gmail.com>: ---------- keywords: +patch pull_requests: +30244 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32166 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45099> _______________________________________
Change by Andrew Svetlov <andrew.svetlov@gmail.com>: ---------- versions: +Python 3.11, Python 3.9 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45099> _______________________________________
Andrew Svetlov <andrew.svetlov@gmail.com> added the comment: New changeset ab89ccff3ca6efc2a8e6f5f45c30d568fb3d212f by Andrew Svetlov in branch 'main': bpo-45099: Document asyncio internal API (GH-32166) https://github.com/python/cpython/commit/ab89ccff3ca6efc2a8e6f5f45c30d568fb3... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45099> _______________________________________
Change by Andrew Svetlov <andrew.svetlov@gmail.com>: ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.10, Python 3.9 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45099> _______________________________________
Yury Selivanov <yselivanov@gmail.com> added the comment:
I have a feeling that we need a low-level API section that describes *supported* API that is intended to task extenders only (guys who want to provide an alternative task factory for example).
I'm not sure how exposing all private methods spiraled out of this issue. We haven't discussed documenting the low-level methods you just exposed Andrew. IMO this should be reverted. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45099> _______________________________________
Jakub Kuczys <kuba.kuczys@gmail.com> added the comment: I'm not sure why this issue was mentioned in GH-32166 since it doesn't really address this but regardless, it appears that my issue has been fixed in PR-31388 and PR-31403 when Serhiy fixed the issue from bpo-46777 so thanks :) ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue45099> _______________________________________
participants (4)
-
Andrew Svetlov
-
jack1142
-
Jakub Kuczys
-
Yury Selivanov