| 67 | return self |
| 68 | |
| 69 | async def __aexit__(self, et, exc, tb): |
| 70 | tb = None |
| 71 | try: |
| 72 | return await self._aexit(et, exc) |
| 73 | finally: |
| 74 | # Exceptions are heavy objects that can have object |
| 75 | # cycles (bad for GC); let's not keep a reference to |
| 76 | # a bunch of them. It would be nicer to use a try/finally |
| 77 | # in __aexit__ directly but that introduced some diff noise |
| 78 | self._parent_task = None |
| 79 | self._errors = None |
| 80 | self._base_error = None |
| 81 | exc = None |
| 82 | |
| 83 | async def _aexit(self, et, exc): |
| 84 | self._exiting = True |