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

Don't require Tornado

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      Now that Motor supports asyncio, arrange for Motor to work without Tornado installed.

      Plan: Move contents of motor/__init__.py into motor/motor_tornado.py, and make it the officially supported idiom for users to do imports like this:

      from motor.motor_tornado import MotorClient
      

      For 0.5, continue supporting the old style to import Motor's Tornado classes like:

      from motor import MotorClient
      

      motor/__init__.py will just do:

      try:
          import tornado
      except ImportError:
          pass
      else:
          from motor.motor_tornado import *
      

      Post a big deprecation warning in the docs.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: