SyntaxError around async keyword on Python 3.7
See original GitHub issueasync
cannot be used as an argument name in Python 3.7:
Describe you environment
- OS Type: Alpine Linux 3.6
- Python version: 3.7-rc
- Pipenv version: N/A
Expected result
I can install pipenv.
Actual result
Traceback (most recent call last):
File "/usr/local/bin/pipenv", line 7, in <module>
from pipenv import cli
File "/usr/local/lib/python3.7/site-packages/pipenv/__init__.py", line 17, in <module>
from .cli import cli
File "/usr/local/lib/python3.7/site-packages/pipenv/cli.py", line 19, in <module>
import delegator
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/delegator.py", line 8, in <module>
from pexpect.popen_spawn import PopenSpawn
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/pexpect/__init__.py", line 75, in <module>
from .pty_spawn import spawn, spawnu
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/pexpect/pty_spawn.py", line 14, in <module>
from .spawnbase import SpawnBase
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/pexpect/spawnbase.py", line 224
def expect(self, pattern, timeout=-1, searchwindowsize=-1, async=False):
^
SyntaxError: invalid syntax
Steps to replicate
pip install pipenv
with Python 3.7.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Python 3.7 syntax error: async is a reserved keyword #4849
Module is named async. More info. I fail to run 3.7 test easily, but this leads to: File "celery/backends/redis.py ...
Read more >Async def invalid syntax - Discussions on Python.org
Hello, today I copied bot from GitHub, but when I wanted to run that bot so it throw this error: File "/home/Bot/bot.py", line...
Read more >Python [Invalid syntax] with async def - Stack Overflow
If you receive a SyntaxError , it means you're using an older ... The async and await keywords are only valid for Python...
Read more >SyntaxError regarding async when attempting to run Jupyter in ...
Yes, the issue is occurring because async was added as a reserved keyword in Python 3.7. When you import pexpect , it's importing...
Read more >Invalid Syntax in Python: Common Reasons for SyntaxError
For example, in Python 3.6 you could use await as a variable name or function name, but as of Python 3.7, that word...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is fixed on master by PR #962
I closed #957 because I don’t think we want the noise from tests failing until 3.7 is at least into a beta phase. I’ll get pexpect updated tonight. Thanks everyone!