Uploaded image for project: 'Motor'
  1. Motor
  2. MOTOR-417

Stop using tornado.gen for coroutine programming

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2
    • Component/s: None
    • Labels:
      None

      Description

      tornado.gen provides utilities for defining and calling coroutines. We use several of these utilities in the Motor project, including but possible not limited to:

      • gen.coroutine - this has been superseded by async def
      • yield - though not really a tornado-specific thing, the use of this keyword to await coroutines was a programming paradigm encouraged by older tornado versions
      • gen.Return - starting in Python 3.5 coroutines can simply return values without needing to wrap them as was done by this helper

      With the demise of Python 3.4- support, we should remove these outdated patterns from our codebase.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              prashant.mital Prashant Mital
              Reporter:
              prashant.mital Prashant Mital
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: