mirror of
https://github.com/python/cpython.git
synced 2026-05-09 14:11:28 -04:00
0a28c0d12e
Future.set_result and Future.set_exception now raise InvalidStateError if the futures are not pending or running. This mirrors the behavior of asyncio.Future, and prevents AssertionErrors in asyncio.wrap_future when set_result is called multiple times.