README.rst 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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.7
  30. * CPython 3.4
  31. * CPython 3.5
  32. * CPython 3.6
  33. * CPython 3.7
  34. * PyPy
  35. * PyPy3