gh-91323: Revert "Allow overriding a future compliance check in asyncio.Task (GH-32197)" (GH-95442) (GH-95652)

This reverts commit d4bb38f82b.
(cherry picked from commit 0342c93a6b)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
This commit is contained in:
Miss Islington (bot) 2022-08-04 09:07:39 -07:00 committed by GitHub
parent 2d84fe59c0
commit 5ac3d0f573
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 122 deletions

View file

@ -2384,13 +2384,7 @@ def add_subclass_tests(cls):
return super().add_done_callback(*args, **kwargs)
class Task(CommonFuture, BaseTask):
def __init__(self, *args, **kwargs):
self._check_future_called = 0
super().__init__(*args, **kwargs)
def _check_future(self, future):
self._check_future_called += 1
return super()._check_future(future)
pass
class Future(CommonFuture, BaseFuture):
pass
@ -2416,8 +2410,6 @@ def add_subclass_tests(cls):
dict(fut.calls),
{'add_done_callback': 1})
self.assertEqual(1, task._check_future_called)
# Add patched Task & Future back to the test case
cls.Task = Task
cls.Future = Future