From 5680320e5c11570f616bd0293ffe3edf9ab65e73 Mon Sep 17 00:00:00 2001 From: Andrew Widdersheim Date: Tue, 19 Feb 2019 16:09:46 -0500 Subject: [PATCH] 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. --- gunicorn/workers/gthread.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/gunicorn/workers/gthread.py b/gunicorn/workers/gthread.py index 5625a91e..48e93764 100644 --- a/gunicorn/workers/gthread.py +++ b/gunicorn/workers/gthread.py @@ -10,6 +10,7 @@ # If no event happen after the keep alive timeout, the connection is # closed. +import concurrent.futures as futures import errno import os import selectors @@ -27,13 +28,6 @@ from .. import http from .. import util 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):