DESCRIPTION.rst 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. .. image:: https://jazzband.co/static/img/badge.svg
  2. :target: https://jazzband.co/
  3. :alt: Jazzband
  4. .. image:: https://readthedocs.org/projects/contextlib2/badge/?version=latest
  5. :target: https://contextlib2.readthedocs.org/
  6. :alt: Latest Docs
  7. .. image:: https://img.shields.io/travis/jazzband/contextlib2/master.svg
  8. :target: http://travis-ci.org/jazzband/contextlib2
  9. .. image:: https://coveralls.io/repos/github/jazzband/contextlib2/badge.svg?branch=master
  10. :target: https://coveralls.io/github/jazzband/contextlib2?branch=master
  11. .. image:: https://landscape.io/github/jazzband/contextlib2/master/landscape.svg
  12. :target: https://landscape.io/github/jazzband/contextlib2/
  13. contextlib2 is a backport of the `standard library's contextlib
  14. module <https://docs.python.org/3.5/library/contextlib.html>`_ to
  15. earlier Python versions.
  16. It also serves as a real world proving ground for possible future
  17. enhancements to the standard library version.
  18. Development
  19. -----------
  20. contextlib2 has no runtime dependencies, but requires ``unittest2`` for testing
  21. on Python 2.x, as well as ``setuptools`` and ``wheel`` to generate universal
  22. wheel archives.
  23. Local testing is just a matter of running ``python test_contextlib2.py``.
  24. You can test against multiple versions of Python with
  25. `tox <https://tox.testrun.org/>`_::
  26. pip install tox
  27. tox
  28. Versions currently tested in both tox and Travis CI are:
  29. * CPython 2.6
  30. * CPython 2.7
  31. * CPython 3.4
  32. * CPython 3.5
  33. * CPython 3.6
  34. * CPython 3.7 (CPython development branch)
  35. * PyPy
  36. Versions currently tested only in tox are:
  37. * PyPy3
  38. This is due to an exception chaining compatibility bug that was fixed in
  39. the PyPy3 5.5 alpha release, while the version on Travis CI (as of April 2017)
  40. is still the older PyPy3 2.4.0 release.