Skip to content

async failure in Python 2.7 #384

@appukuttan-shailesh

Description

@appukuttan-shailesh

The following files need to be deleted in Python 2.7 for sumatra.dependency_finder.find_dependencies to work:

  • jinja2.asyncfilters.py
  • jinja2.asyncsupport.py
  • pexpect._async.py

Errors that arise are:

async def concat_async(async_gen):
       ^

SyntaxError: invalid syntax

and

transport, pw = yield from asyncio.get_event_loop()\
                        ^

SyntaxError: invalid syntax

From what I understand, the above files are functional only in Python 3.x.

@apdavison : On this line, there seems to be an effort to handle the issues arising out of async, but it seems to fail. Any quick fix to handle the above files?

Also, the above list of files are quite certainly only a sample of issues that might arise with Py 2 & 3 code in a single package. Is a more foolproof workaround possible, that for example might ignore or appropriately convert Py3 only statements (such as yield from ...)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions