mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Simplify futures import
Commits e974f305 and 78208c8c removed support for Python 2 and Python <3.4 respectively so the conditional logic for importing `concurrent.futures` is no longer necessary as it has been part of the standard library since Python 3.2.
This commit is contained in:
parent
a4e249d9b0
commit
5680320e5c
@ -10,6 +10,7 @@
|
|||||||
# If no event happen after the keep alive timeout, the connection is
|
# If no event happen after the keep alive timeout, the connection is
|
||||||
# closed.
|
# closed.
|
||||||
|
|
||||||
|
import concurrent.futures as futures
|
||||||
import errno
|
import errno
|
||||||
import os
|
import os
|
||||||
import selectors
|
import selectors
|
||||||
@ -27,13 +28,6 @@ from .. import http
|
|||||||
from .. import util
|
from .. import util
|
||||||
from ..http import wsgi
|
from ..http import wsgi
|
||||||
|
|
||||||
try:
|
|
||||||
import concurrent.futures as futures
|
|
||||||
except ImportError:
|
|
||||||
raise RuntimeError("""
|
|
||||||
You need to install the 'futures' package to use this worker with this
|
|
||||||
Python version.
|
|
||||||
""")
|
|
||||||
|
|
||||||
class TConn(object):
|
class TConn(object):
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user