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

Deprecate yield from and @coroutine in asyncio #81102

Closed
asvetlov opened this issue May 15, 2019 · 3 comments
Closed

Deprecate yield from and @coroutine in asyncio #81102

asvetlov opened this issue May 15, 2019 · 3 comments
Labels

Comments

@asvetlov
Copy link
Contributor

BPO 36921
Nosy @njsmith, @asvetlov, @1st1, @MojoVampire, @miss-islington
PRs
  • bpo-36921: Deprecate @coroutine and yield from in asyncio #13334
  • bpo-36921: Deprecate @coroutine for sake of async def #13346
  • 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 2019-05-24.14:17:40.056>
    created_at = <Date 2019-05-15.08:32:31.751>
    labels = ['3.8', 'expert-asyncio']
    title = 'Deprecate yield from and @coroutine in asyncio'
    updated_at = <Date 2021-04-26.21:17:39.992>
    user = 'https://github.com/asvetlov'

    bugs.python.org fields:

    activity = <Date 2021-04-26.21:17:39.992>
    actor = 'njs'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-05-24.14:17:40.056>
    closer = 'asvetlov'
    components = ['asyncio']
    creation = <Date 2019-05-15.08:32:31.751>
    creator = 'asvetlov'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 36921
    keywords = ['patch']
    message_count = 3.0
    messages = ['342649', '372177', '391987']
    nosy_count = 5.0
    nosy_names = ['njs', 'asvetlov', 'yselivanov', 'josh.r', 'miss-islington']
    pr_nums = ['13334', '13346']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue36921'
    versions = ['Python 3.8']

    @miss-islington
    Copy link
    Contributor

    New changeset 68b34a7 by Miss Islington (bot) (Andrew Svetlov) in branch 'master':
    bpo-36921: Deprecate @coroutine for sake of async def (GH-13346)
    68b34a7

    @MojoVampire
    Copy link
    Mannequin

    MojoVampire mannequin commented Jun 23, 2020

    Was this supposed to deprecate using types.coroutine as a decorator as well? Because that's not clearly documented, which means people can still use it to make generator-based coroutines without async def.

    @njsmith
    Copy link
    Contributor

    njsmith commented Apr 26, 2021

    @types.coroutine is still useful as a tool for writing "foundation" coroutines that directly interact with the coroutine runner, e.g.:

    https://github.com/python-trio/trio/blob/94562c54d241859eb05ed85c88fd6073d6752ff6/trio/_core/_traps.py#L12-L21

    https://github.com/dabeaz/curio/blob/27ccf4d130dd8c048e28bd15a22015bce3f55d53/curio/traps.py#L28-L36

    So I think it's only @asyncio.coroutine that should be deprecated.

    @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
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants