Skip to content

async and await are reserved keywords in Python 3.7 and raise a SyntaxError when used as variables #147

@geowurster

Description

@geowurster

This package uses at least await as a variable name, as evidenced by:

Traceback (most recent call last):
  File "/Users/kevin.wurster/code/notebooks/venv/bin/planet", line 7, in <module>
    from planet.scripts import main
  File "/Users/kevin.wurster/code/notebooks/venv/lib/python3.7/site-packages/planet/scripts/__init__.py", line 15, in <module>
    from planet.scripts import cli
  File "/Users/kevin.wurster/code/notebooks/venv/lib/python3.7/site-packages/planet/scripts/cli.py", line 19, in <module>
    from planet import api
  File "/Users/kevin.wurster/code/notebooks/venv/lib/python3.7/site-packages/planet/api/__init__.py", line 18, in <module>
    from .client import (ClientV1)
  File "/Users/kevin.wurster/code/notebooks/venv/lib/python3.7/site-packages/planet/api/client.py", line 17, in <module>
    from .dispatch import RequestsDispatcher
  File "/Users/kevin.wurster/code/notebooks/venv/lib/python3.7/site-packages/planet/api/dispatch.py", line 24, in <module>
    from . models import Response
  File "/Users/kevin.wurster/code/notebooks/venv/lib/python3.7/site-packages/planet/api/models.py", line 58
    def get_body_async(self, handler, await=None):
                                          ^
SyntaxError: invalid syntax

In simpler terms:

$ python3
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 26 2018, 23:26:24) 
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> await = True
  File "<stdin>", line 1
    await = True
          ^
SyntaxError: invalid syntax

Unfortunately Travis inexplicably does not support Python 3.7 (travis-ci/travis-ci#9815).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions