-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
Currently, a lot of code that support syntax introduced in Python 3.5+ is injected into the codebase via exec calls inside an if... block:
if PY35: exec(textwrap.dedent(""" def __aiter__(self): return self __anext__ = next async def __aenter__(self): return self async def __aexit__(self, exc_type, exc_val, exc_tb): if self.delegate: self.delegate.close() """), globals(), locals())
Once we no longer support older runtime versions, this code should become a first-class citizen in the codebase.
- related to
-
MOTOR-416 Remove quoted text/code for __aiter__ and __anext__ helpers
- Closed