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.0a4 x64 Windows throws SyntaxError on library import #1116

Closed
ScttB opened this issue Mar 4, 2018 · 11 comments
Closed

Python 3.7.0a4 x64 Windows throws SyntaxError on library import #1116

ScttB opened this issue Mar 4, 2018 · 11 comments

Comments

@ScttB
Copy link

ScttB commented Mar 4, 2018

  File "scottbeebibot.py", line 1, in <module>
    import discord
  File "C:\Users\####\AppData\Local\Programs\Python\Python37\lib\site-packages\discord\__init__.py", line 20, in <module>
    from .client import Client, AppInfo, ChannelPermissions
  File "C:\Users\####\AppData\Local\Programs\Python\Python37\lib\site-packages\discord\client.py", line 38, in <module>
    from .state import ConnectionState
  File "C:\Users\####\AppData\Local\Programs\Python\Python37\lib\site-packages\discord\state.py", line 36, in <module>
    from . import utils, compat
  File "C:\Users\####\AppData\Local\Programs\Python\Python37\lib\site-packages\discord\compat.py", line 32
    create_task = asyncio.async
                              ^
SyntaxError: invalid syntax```
@Rapptz
Copy link
Owner

Rapptz commented Mar 4, 2018

This is already fixed in development but not published on PyPI because 3.7 is not stable.

@Rapptz Rapptz closed this as completed Mar 4, 2018
@ScttB
Copy link
Author

ScttB commented Mar 4, 2018

Thanks, didn't think I would need to use the development version, you should probably put that in the FAQ until it's published.

@gogurtenjoyer
Copy link

I'm confused - you want them to put a note in the FAQ for everyone who happens to be using a pre-release python and expecting this to work?

@jwshields
Copy link
Contributor

README.md on this repo shows "3.4, 3.5" as the versions that this library is compatible for.
The prereqs of rewrite state "3.4.2 or higher" [Here] which, while doesn't explicitly disallow 3.7, it should be more or less inferred that developmental versions of languages should be used with care, if they're decided to be used at all.

On a tangent, read this thread, npm/npm#19883 (comment)
NPM mistakenly published a pre-release version which broke many things.

IMO, there's no good reason to explicitly call out to not use 3.7 - if somebody is aware enough to download 3.7, they're making an obvious and conscious choice to download a pre-release version of the language. See this link: Python.org Downloads - The main download presented is 3.6.4; and to get 3.7 you'd need to click into the pre-release link.

@vanillamice
Copy link

Now python 3.7 is stable and it's the main download but still this error shows up.

@sethwheway
Copy link
Contributor

Yes, the async branch of dpy does not get updates anymore. There is a fix for the error on the repo but it has not been pushed to pypi

@vanillamice
Copy link

what should i do then? just manually fix it? or go back to 3.6.something?

@vanillamice
Copy link

i used the fix in the repo,thanks anyway

@vanillamice
Copy link

okay i fixed it but run into a similar problem with the websockets module,i think i will just go back to 3.6

@sethwheway
Copy link
Contributor

If you need 3.7, you can install websockets from the repo as this also has a 3.7 fix, but unless it's needed I'd just use 3.6.6 for now

@Harmon758
Copy link
Contributor

See also #1249 and #1401

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

7 participants