DESCRIPTION.rst 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  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 should not be installed on Python 3, although there should be no harm in doing so, as the
  6. standard library takes precedence over third party libraries.
  7. To conditionally require this library only on Python 2, you can do this in your ``setup.py``:
  8. .. code-block:: python
  9. setup(
  10. ...
  11. extras_require={
  12. ':python_version == "2.7"': ['futures']
  13. }
  14. )
  15. Or, using the newer syntax:
  16. .. code-block:: python
  17. setup(
  18. ...
  19. install_requires={
  20. 'futures; python_version == "2.7"'
  21. }
  22. )
  23. .. warning:: The ``ProcessPoolExecutor`` class has known (unfixable) problems on Python 2 and
  24. should not be relied on for mission critical work.
  25. .. _concurrent.futures: https://docs.python.org/library/concurrent.futures.html