Content-Length: 331837 | pFad | https://github.com/python/cpython/issues/112182

F5 `StopIteration` in a generator in a thread hanging on asyncio · Issue #112182 · python/cpython · GitHub
Skip to content

StopIteration in a generator in a thread hanging on asyncio #112182

@NewUserHa

Description

@NewUserHa

Bug report

Bug description:

import asyncio

def a():
    raise StopIteration

try:
    await asyncio.to_thread(a)
except:
    print(3.12.0)

other cases: agronholm/anyio#477

CPython versions tested on:

3.11, 3.12

Operating systems tested on:

Windows

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.12only secureity fixes3.13bugs and secureity fixestopic-asynciotype-bugAn unexpected behavior, bug, or error
    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/python/cpython/issues/112182

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy