Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.7 Incompatibility #1648

Closed
Coolguy3289 opened this issue Oct 6, 2018 · 5 comments
Closed

Python 3.7 Incompatibility #1648

Coolguy3289 opened this issue Oct 6, 2018 · 5 comments

Comments

@Coolguy3289
Copy link

Coolguy3289 commented Oct 6, 2018

New in Python 3.7:

Backwards incompatible syntax changes:
    async and await are now reserved keywords.

Due to this, the code in compat.py

except AttributeError:
    create_task = asyncio.async

Discord will not run because of a syntax error:

Traceback (most recent call last):
  File "C:/Users/Ralph/PycharmProjects/asukabot/app/main.py", line 1, in <module>
    import discord
  File "C:\Users\Ralph\AppData\Roaming\Python\Python37\site-packages\discord\__init__.py", line 20, in <module>
    from .client import Client, AppInfo, ChannelPermissions
  File "C:\Users\Ralph\AppData\Roaming\Python\Python37\site-packages\discord\client.py", line 38, in <module>
    from .state import ConnectionState
  File "C:\Users\Ralph\AppData\Roaming\Python\Python37\site-packages\discord\state.py", line 36, in <module>
    from . import utils, compat
  File "C:\Users\Ralph\AppData\Roaming\Python\Python37\site-packages\discord\compat.py", line 32
    create_task = asyncio.async
                              ^
SyntaxError: invalid syntax
@Harmon758
Copy link
Contributor

Duplicate of #1249 and #1401

@Coolguy3289
Copy link
Author

Right, so just gonna switch to the rewrite. Is there something in the docs to reference this?

@Harmon758
Copy link
Contributor

See https://discordpy.readthedocs.io/en/rewrite/migrating.html.
You should also join the official discord.py server for news and updates, including breaking changes, about the rewrite branch.

@Coolguy3289
Copy link
Author

So is Rewrite what all should be moving too?

@Harmon758
Copy link
Contributor

Harmon758 commented Oct 6, 2018

The rewrite branch is the next major version of the library.
Further questions about it should be directed to the official discord.py server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants