bpo-44471: Change error type for bad objects in ExitStack.enter_context() (GH-26820)
A TypeError is now raised instead of an AttributeError in ExitStack.enter_context() and AsyncExitStack.enter_async_context() for objects which do not support the context manager or asynchronous context manager protocols correspondingly.
S
Serhiy Storchaka committed
6cb145d23f5cf69b6d7414877d142747cd3d134c
Parent: 20a8800
Committed by GitHub <noreply@github.com>
on 6/29/2021, 8:28:15 AM