diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 4683932..deeb4d8 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -22,7 +22,7 @@ jobs: os: - ubuntu-20.04 python: - - "2.7" + - "3.5" - "3.6" - "3.7" - "3.8" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 3c6e79c..0000000 --- a/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[bdist_wheel] -universal=1 diff --git a/setup.py b/setup.py index 84f1687..41cbc9f 100644 --- a/setup.py +++ b/setup.py @@ -33,12 +33,11 @@ def run(self): author="Min RK", author_email="benjaminrk@gmail.com", description="Capture C-level output in context managers", - install_requires=["selectors2; python_version<'3.4'"], long_description=long_description, long_description_content_type="text/markdown", url="https://github.com/minrk/wurlitzer", py_modules=["wurlitzer"], - python_requires=">=2.7", + python_requires=">=3.5", license="MIT", cmdclass={ "bdist_egg": bdist_egg if "bdist_egg" in sys.argv else bdist_egg_disabled @@ -47,7 +46,6 @@ def run(self): "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", - "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", ], ) diff --git a/wurlitzer.py b/wurlitzer.py index 28cda97..31650ab 100644 --- a/wurlitzer.py +++ b/wurlitzer.py @@ -18,24 +18,14 @@ import errno import io import os -from contextlib import contextmanager -from fcntl import F_GETFL, F_SETFL, fcntl - -try: - from queue import Queue -except ImportError: - from Queue import Queue - -try: - import selectors -except ImportError: - # py < 3.4 - import selectors2 as selectors - +import selectors import sys import threading import time import warnings +from contextlib import contextmanager +from fcntl import F_GETFL, F_SETFL, fcntl +from queue import Queue libc = ctypes.CDLL(None)