diff --git a/cheroot/_compat.py b/cheroot/_compat.py index 7f7a380a1a..f879e5eee6 100644 --- a/cheroot/_compat.py +++ b/cheroot/_compat.py @@ -1,3 +1,4 @@ +# pylint: disable=unused-import """Compatibility code for using Cheroot with various versions of Python.""" from __future__ import absolute_import, division, print_function @@ -11,7 +12,10 @@ try: import selectors # lgtm [py/unused-import] except ImportError: - import selectors2 as selectors # noqa: F401 # lgtm [py/unused-import] + try: + import selectors2 as selectors # noqa: F401 # lgtm [py/unused-import] + except ImportError: + import selectors34 as selectors # noqa: F401 # lgtm [py/unused-import] try: import ssl diff --git a/setup.cfg b/setup.cfg index cf2df16f9a..e56717d9e1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -65,7 +65,8 @@ setup_requires = # These are required in actual runtime: install_requires = backports.functools_lru_cache; python_version < '3.3' - selectors2; python_version< '3.4' + selectors2; python_version < '3.4' and (sys_platform != "win32" or (sys_platform == "win32" and python_version >= '3.0')) + selectors34; python_version < '3.0' and sys_platform == "win32" six>=1.11.0 more_itertools>=2.6 jaraco.functools