Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

asyncio.Task's documentation says that loop arg is removed when it's not #89262

Closed
jack1142 mannequin opened this issue Sep 4, 2021 · 7 comments
Closed

asyncio.Task's documentation says that loop arg is removed when it's not #89262

jack1142 mannequin opened this issue Sep 4, 2021 · 7 comments
Labels
3.11 bug and security fixes docs Documentation in the Doc dir topic-asyncio type-bug An unexpected behavior, bug, or error

Comments

@jack1142
Copy link
Mannequin

jack1142 mannequin commented Sep 4, 2021

BPO 45099
Nosy @asvetlov, @1st1, @jack1142
PRs
  • bpo-45099: Document asyncio internal API #32166
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2022-03-31.21:06:35.643>
    created_at = <Date 2021-09-04.17:03:48.457>
    labels = ['3.11', 'type-bug', 'docs', 'expert-asyncio']
    title = "asyncio.Task's documentation says that loop arg is removed when it's not"
    updated_at = <Date 2022-04-02.23:27:06.485>
    user = 'https://github.com/jack1142'

    bugs.python.org fields:

    activity = <Date 2022-04-02.23:27:06.485>
    actor = 'jack1142'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2022-03-31.21:06:35.643>
    closer = 'asvetlov'
    components = ['Documentation', 'asyncio']
    creation = <Date 2021-09-04.17:03:48.457>
    creator = 'jack1142'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 45099
    keywords = ['patch']
    message_count = 7.0
    messages = ['401047', '413393', '413396', '413462', '416459', '416469', '416603']
    nosy_count = 4.0
    nosy_names = ['asvetlov', 'docs@python', 'yselivanov', 'jack1142']
    pr_nums = ['32166']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue45099'
    versions = ['Python 3.11']

    @jack1142
    Copy link
    Mannequin Author

    jack1142 mannequin commented Sep 4, 2021

    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?

    @jack1142 jack1142 mannequin added the 3.10 only security fixes label Sep 4, 2021
    @jack1142 jack1142 mannequin assigned docspython Sep 4, 2021
    @jack1142 jack1142 mannequin added docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error 3.10 only security fixes labels Sep 4, 2021
    @jack1142 jack1142 mannequin assigned docspython Sep 4, 2021
    @jack1142 jack1142 mannequin added docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error topic-asyncio labels Sep 4, 2021
    @asvetlov
    Copy link
    Contributor

    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.

    @jack1142
    Copy link
    Mannequin Author

    jack1142 mannequin commented Feb 17, 2022

    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.

    @asvetlov
    Copy link
    Contributor

    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.

    @asvetlov asvetlov added 3.9 only security fixes 3.11 bug and security fixes labels Mar 28, 2022
    @asvetlov
    Copy link
    Contributor

    New changeset ab89ccf by Andrew Svetlov in branch 'main':
    bpo-45099: Document asyncio internal API (GH-32166)
    ab89ccf

    @asvetlov asvetlov removed 3.9 only security fixes 3.10 only security fixes labels Mar 31, 2022
    @asvetlov asvetlov removed 3.9 only security fixes 3.10 only security fixes labels Mar 31, 2022
    @1st1
    Copy link
    Member

    1st1 commented Apr 1, 2022

    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.

    @jack1142
    Copy link
    Mannequin Author

    jack1142 mannequin commented Apr 2, 2022

    I'm not sure why this issue was mentioned in #76347 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 :)

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.11 bug and security fixes docs Documentation in the Doc dir topic-asyncio type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants