mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
gh-91323: Revert "Allow overriding a future compliance check in asyncio.Task (GH-32197)" (GH-95442) (GH-95652)
This reverts commitd4bb38f82b
. (cherry picked from commit0342c93a6b
) Co-authored-by: Łukasz Langa <lukasz@langa.pl>
This commit is contained in:
parent
2d84fe59c0
commit
5ac3d0f573
5 changed files with 10 additions and 122 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue