Remove Python 3.6 support

This commit is contained in:
Adam Hopkins
2021-02-21 23:28:28 +02:00
parent 8f8c00a99d
commit 37f0a51063
6 changed files with 7 additions and 46 deletions

View File

@@ -4,7 +4,6 @@ import os
import secrets
import socket
import stat
import sys
from asyncio import CancelledError
from functools import partial
@@ -125,7 +124,6 @@ class HttpProtocol(asyncio.Protocol):
):
asyncio.set_event_loop(loop)
self.loop = loop
deprecated_loop = self.loop if sys.version_info < (3, 7) else None
self.app = app
self.url = None
self.transport = None
@@ -147,8 +145,8 @@ class HttpProtocol(asyncio.Protocol):
self.state = state if state else {}
if "requests_count" not in self.state:
self.state["requests_count"] = 0
self._data_received = asyncio.Event(loop=deprecated_loop)
self._can_write = asyncio.Event(loop=deprecated_loop)
self._data_received = asyncio.Event()
self._can_write = asyncio.Event()
self._can_write.set()
self._exception = None
self._unix = unix