First of all it seems like this commit was never actually pushed to pypi as it still breaks until I change it manually, even though I'm on the latest 0.16.12 version.
Even if you do fix that manually, you still can't run discord.py in Python 3.7 because the websockets<4.0,>=3.1 aiohttp<1.1.0,>=1.0.0 requirements don't have the equivalent 3.7 fixes installed - they only came in later versions outside these ranges.
You can pip install directly from GitHub for that commit.
You can also upgrade those dependencies after installing discord.py, or install with the --no-dependencies flag if you already have them upgraded.
However, you are correct in that the async branch doesn't currently support Python 3.7.
I'd recommend that you downgrade to 3.6 or switch to the rewrite branch if you want to use 3.7.
Also note, the latest websockets release doesn't support 3.7 yet, so you'd have to upgrade websockets from GitHub, even on the rewrite branch.
Websockets 6.0 has been released, with Python 3.7 support, so the rewrite branch should work by upgrading websockets from PyPI now.
I believe the async branch now also works on Python 3.7 when installed from GitHub and with up to date aiohttp and websockets versions. However, support with these versions isn't guaranteed, so I'd still recommend either downgrading to Python 3.6 or switching to the rewrite branch to use 3.7.
Also, the rewrite branch updated the websockets requirement with https://github.com/Rapptz/discord.py/commit/34ece4d1dfee955d23100737d70190a5cdd3ee8d, so upgrading websockets separately isn't necessary anymore.
For those interested, this is the command you need to instal the rewrite branch via pip3:
pip3 install git+https://github.com/Rapptz/discord.py@rewrite
:+1:
This is causing issues with Home Assistant now https://github.com/home-assistant/home-assistant/issues/21374
Any chance the fix could be pushed to pippy?
If there was the chance, the fix would've been pushed to PyPI long ago.
That last commit (in the async branch) was around Nov 13, 2017, about 470 days ago.
The next push to PyPI will happen in March or so.
That push will be v1.0.0, the rewrite branch, which includes many breaking changes.
Most helpful comment
For those interested, this is the command you need to instal the
rewritebranch viapip3::+1: