Python Version

We recommend using the latest version of Python 3. Deprecated Library supports Python 3.4 and newer, Python 2.7 and newer, and PyPy 2.7 and 3.6.


This library uses the Wrapt library as a basis to construct function wrappers and decorator functions.

Development dependencies

These distributions will not be installed automatically. You need to install them explicitly with pip install -e .[dev].

  • pytest is a framework which makes it easy to write small tests, yet scales to support complex functional testing for applications and libraries…
  • pytest-cov is a pytest plugin used to produce coverage reports.
  • tox aims to automate and standardize testing in Python. It is part of a larger vision of easing the packaging, testing and release process of Python software…
  • bump2version is a small command line tool to simplify releasing software by updating all version strings in your source code by the correct increment. Also creates commits and tags…
  • sphinx is a tool that makes it easy to create intelligent and beautiful documentation.

Virtual environments

Use a virtual environment to manage the dependencies for your project, both in development and in production.

What problem does a virtual environment solve? The more Python projects you have, the more likely it is that you need to work with different versions of Python libraries, or even Python itself. Newer versions of libraries for one project can break compatibility in another project.

Virtual environments are independent groups of Python libraries, one for each project. Packages installed for one project will not affect other projects or the operating system’s packages.

Python 3 comes bundled with the venv module to create virtual environments. If you’re using a modern version of Python, you can continue on to the next section.

If you’re using Python 2, see Install virtualenv first.

Create an environment

Create a project folder and a venv folder within:

mkdir myproject
cd myproject
python3 -m venv venv

On Windows:

py -3 -m venv venv

If you needed to install virtualenv because you are on an older version of Python, use the following command instead:

virtualenv venv

On Windows:

\Python27\Scripts\virtualenv.exe venv

Activate the environment

Before you work on your project, activate the corresponding environment:

. venv/bin/activate

On Windows:


Your shell prompt will change to show the name of the activated environment.

Install Deprecated

Within the activated environment, use the following command to install Deprecated:

pip install Deprecated

Living on the edge

If you want to work with the latest Deprecated code before it’s released, install or update the code from the master branch:

pip install -U

Install virtualenv

If you are using Python 2, the venv module is not available. Instead, install virtualenv.

On Linux, virtualenv is provided by your package manager:

# Debian, Ubuntu
sudo apt-get install python-virtualenv

# CentOS, Fedora
sudo yum install python-virtualenv

# Arch
sudo pacman -S python-virtualenv

If you are on Mac OS X or Windows, download, then:

sudo python2 Downloads/
sudo python2 -m pip install virtualenv

On Windows, as an administrator:

\Python27\python.exe Downloads\
\Python27\python.exe -m pip install virtualenv

Now you can continue to Create an environment.