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

"invalid syntax" when installing in Python 2

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.5
    • Component/s: asyncio
    • Labels:
      None

      Description

      Upgrading an old Python 2.7 virtualenv from Motor 0.2.1 to the version on master (01f2b01):

      pip install git+https://github.com/mongodb/motor.git
      Downloading/unpacking git+https://github.com/mongodb/motor.git
        Cloning https://github.com/mongodb/motor.git to /var/folders/qf/1_htbmz16kg_6qsqzchskq8r0000gq/T/pip-_AnBuG-build
      git hooks not installed in this repository.  Run 'git hooks --install' to install it or 'git hooks -h' for more information.
        Running setup.py (path:/var/folders/qf/1_htbmz16kg_6qsqzchskq8r0000gq/T/pip-_AnBuG-build/setup.py) egg_info for package from git+https://github.com/mongodb/motor.git
       
      Requirement already satisfied (use --upgrade to upgrade): greenlet>=0.4.0 in /Users/emptysquare/.virtualenvs/motor-blog/lib/python2.7/site-packages (from motor==0.5.dev0)
      Requirement already satisfied (use --upgrade to upgrade): pymongo==2.8.0 in /Users/emptysquare/.virtualenvs/motor-blog/lib/python2.7/site-packages (from motor==0.5.dev0)
      Installing collected packages: motor
        Found existing installation: motor 0.2.1
          Uninstalling motor:
            Successfully uninstalled motor
        Running setup.py install for motor
            File "/Users/emptysquare/.virtualenvs/motor-blog/lib/python2.7/site-packages/motor/frameworks/asyncio.py", line 135
              result = yield from f(self, *args, **kwargs)
                                ^
          SyntaxError: invalid syntax
       
       
      Successfully installed motor
      Cleaning up...
      

      Motor is installed, but it prints an error while trying to precompile the install files. Presumably, we need to omit frameworks/asyncio.py when installing in Python < 3.3, since it can't be compiled or used.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: