[7.x] Add support for Python 3.9

This commit is contained in:
Seth Michael Larson
2020-07-01 12:42:34 -05:00
committed by GitHub
parent 084295787d
commit dbac4cac6a
2 changed files with 7 additions and 1 deletions
+6 -1
View File
@@ -5,6 +5,7 @@
import asyncio
import logging
from itertools import chain
import sys
from .compat import get_running_loop
from .http_aiohttp import AIOHttpConnection
@@ -162,9 +163,13 @@ class AsyncTransport(Transport):
done = ()
try:
while tasks:
# The 'loop' keyword is deprecated in 3.8+ so don't
# pass it to asyncio.wait() unless we're on <=3.7
wait_kwargs = {"loop": self.loop} if sys.version_info < (3, 8) else {}
# execute sniff requests in parallel, wait for first to return
done, tasks = await asyncio.wait(
tasks, return_when=asyncio.FIRST_COMPLETED, loop=self.loop
tasks, return_when=asyncio.FIRST_COMPLETED, **wait_kwargs
)
# go through all the finished tasks
for t in done:
+1
View File
@@ -57,6 +57,7 @@ setup(
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
],