Skip to main content

Backports and enhancements for the contextlib module

Project description

Latest Docs https://img.shields.io/travis/ncoghlan/contextlib2/master.svg https://coveralls.io/repos/github/ncoghlan/contextlib2/badge.svg?branch=master https://landscape.io/github/ncoghlan/contextlib2/master/landscape.svg

contextlib2 is a backport of the standard library’s contextlib module to earlier Python versions.

It also serves as a real world proving ground for possible future enhancements to the standard library version.

Development

contextlib2 has no runtime dependencies, but requires unittest2 for testing on Python 2.x.

Local testing is just a matter of running python test_contextlib2.py.

You can test against multiple versions of Python with tox:

pip install tox
tox

Versions currently tested in both tox and Travis CI are:

  • CPython 2.6

  • CPython 2.7

  • CPython 3.4

  • CPython 3.5

  • CPython 3.6 (CPython development branch)

  • PyPy

tox also has a PyPy3 configuration, but it is not configured in Travis due to a known incompatibility.

To install several of the relevant runtimes on Fedora 23:

sudo dnf install python python3 pypy pypy3
sudo dnf copr enable -y mstuchli/Python3.5
sudo dnf install python35-python3

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

contextlib2-0.5.3.tar.gz (26.4 kB view details)

Uploaded Source

Built Distribution

contextlib2-0.5.3-py2.py3-none-any.whl (8.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file contextlib2-0.5.3.tar.gz.

File metadata

  • Download URL: contextlib2-0.5.3.tar.gz
  • Upload date:
  • Size: 26.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for contextlib2-0.5.3.tar.gz
Algorithm Hash digest
SHA256 30e500f13921c73c96f49a6dd2adfbdd92bc3fae12183e91b06b2e4583486206
MD5 26ad6b6e4d60aa36cb4ecee4747cddd4
BLAKE2b-256 690572b6adf92157a3d686f04a0a797efc3212808a6abd6aa96fef13358e1b0d

See more details on using hashes here.

File details

Details for the file contextlib2-0.5.3-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for contextlib2-0.5.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 888a280f24dcff2cc55ac0e51fc764484b284f91ff711a219e459a6d5f76de2b
MD5 59a03a491b52348958fb4acef52817d8
BLAKE2b-256 e6020db6f0ed807f7fa9c005cc0e2ebb3d732ce2da7c5467fe26870a2af74155

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page