Python 3.8 builds are filled with warnings about asyncio API changes: https://travis-ci.org/encode/httpx/jobs/574559125
Looks like as as of Python 3.8, asyncio.open_connection() is deprecated in favor of asyncio.connect() — see the asyncio 3.8+ docs.
# < 3.8
reader, writer = await asyncio.open_connection('127.0.0.1', 8888)
# 3.8+
async with asyncio.connect('127.0.0.1', 8888) as stream:
...
# or:
stream = await asyncio.connect('127.0.0.1', 8888)
This is not a trivial API change, and I don't know if there are plans to back-port asyncio.connect() to 3.7 and below.
So at first glance resolving this would need to adapt the .connect() method on AsyncioBackend to use one or the other depending on the Python version we're running on — and also make Reader/Writer pair (and soon Stream) handle both possibilities ?
Originally raised in: #255 (comment)
Python 3.8 builds are filled with warnings about asyncio API changes: https://travis-ci.org/encode/httpx/jobs/574559125
Looks like as as of Python 3.8,
asyncio.open_connection()is deprecated in favor ofasyncio.connect()— see the asyncio 3.8+ docs.This is not a trivial API change, and I don't know if there are plans to back-port
asyncio.connect()to 3.7 and below.So at first glance resolving this would need to adapt the
.connect()method onAsyncioBackendto use one or the other depending on the Python version we're running on — and also makeReader/Writerpair (and soonStream) handle both possibilities ?Originally raised in: #255 (comment)