Upgraded the Python 3 warnings Since some users have ignored the warnings and tried to use this on Python 3, the warning has been changed to a hard failure when running setup.py on py3. The README now also reflects this.
diff --git a/README.rst b/README.rst index 7f1ef68..1305003 100644 --- a/README.rst +++ b/README.rst
@@ -4,8 +4,9 @@ This is a backport of the `concurrent.futures`_ standard library module to Python 2. -It should not be installed on Python 3, although there should be no harm in doing so, as the -standard library takes precedence over third party libraries. +It **does not** work on Python 3 due to Python 2 syntax being used in the codebase. +Python 3 users should not attempt to install it, since the package is already included in the +standard library. To conditionally require this library only on Python 2, you can do this in your ``setup.py``:
diff --git a/setup.py b/setup.py index d45e66d..792c4f0 100755 --- a/setup.py +++ b/setup.py
@@ -1,13 +1,19 @@ #!/usr/bin/env python # coding: utf-8 -from warnings import warn +from __future__ import print_function + import os.path import sys if sys.version_info[0] > 2: - warn('This backport is meant only for Python 2.\n' - 'Python 3 users do not need it, as the concurrent.futures ' - 'package is available in the standard library.') + print('This backport is meant only for Python 2.\n' + 'It does not work on Python 3, and Python 3 users do not need it ' + 'as the concurrent.futures package is available in the standard library.\n' + 'For projects that work on both Python 2 and 3, the dependency needs to be conditional ' + 'on the Python version, like so:\n' + "extras_require={':python_version == \"2.7\"': ['futures']}", + file=sys.stderr) + sys.exit(1) extras = {} try: