• Yury Selivanov's avatar
    bpo-32528: Make asyncio.CancelledError a BaseException. (GH-13528) · 431b540b
    Yury Selivanov authored
    This will address the common mistake many asyncio users make:
    an "except Exception" clause breaking Tasks cancellation.
    
    In addition to this change, we stop inheriting asyncio.TimeoutError
    and asyncio.InvalidStateError from their concurrent.futures.*
    counterparts.  There's no point for these exceptions to share the
    inheritance chain.
    
    In 3.9 we'll focus on implementing supervisors and cancel scopes,
    which should allow better handling of all exceptions, including
    SystemExit and KeyboardInterrupt
    431b540b
base_subprocess.py 8.64 KB