README.rst 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. .. image:: https://travis-ci.org/agronholm/pythonfutures.svg?branch=master
  2. :target: https://travis-ci.org/agronholm/pythonfutures
  3. :alt: Build Status
  4. This is a backport of the `concurrent.futures`_ standard library module to Python 2.
  5. It **does not** work on Python 3 due to Python 2 syntax being used in the codebase.
  6. Python 3 users should not attempt to install it, since the package is already included in the
  7. standard library.
  8. To conditionally require this library only on Python 2, you can do this in your ``setup.py``:
  9. .. code-block:: python
  10. setup(
  11. ...
  12. extras_require={
  13. ':python_version == "2.7"': ['futures']
  14. }
  15. )
  16. Or, using the newer syntax:
  17. .. code-block:: python
  18. setup(
  19. ...
  20. install_requires={
  21. 'futures; python_version == "2.7"'
  22. }
  23. )
  24. .. warning:: The ``ProcessPoolExecutor`` class has known (unfixable) problems on Python 2 and
  25. should not be relied on for mission critical work. Please see `Issue 29 <https://github.com/agronholm/pythonfutures/issues/29>`_ and `upstream bug report <https://bugs.python.org/issue9205>`_ for more details.
  26. .. _concurrent.futures: https://docs.python.org/library/concurrent.futures.html