skillfed

functools32

Backport of the functools module from Python 3.2.3 for use on 2.7 and PyPy.

functools32 v3.2.3-2 371.5K downloads/30d#7,170 on PyPI52
Permissive license PSF license Abandoned released

What it is and what it does

functools32 is a backport of the Python 3.2 functools standard library module for Python 2.7 and PyPy environments. It provides the lru_cache decorator and other functools utilities that were introduced in Python 3.2 but were not available in Python 2.7's standard library. The package has no runtime dependencies and installs as a drop-in replacement for the functools module on Python 2.7.

This package is now obsolete for new projects, as Python 3 has had functools built-in since its inception. It exists only to support legacy codebases that cannot yet migrate away from Python 2.7 or PyPy2. The project has been abandoned, with the last release on 2015-07-11.

Use it for:

  • Add lru_cache decorator to Python 2.7 code without rewriting caching logic.
  • Maintain compatibility with Python 3.2+ functools API while running on Python 2.7.
  • Backport a Python 3 library to Python 2.7 that depends on functools.lru_cache.
  • Support PyPy2 environments that need the newer functools interface.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Backport of Python 3.2's functools module (including lru_cache decorator) for Python 2.7 and PyPy.

No, unless you are maintaining a legacy Python 2.7 or PyPy2 codebase that cannot migrate to Python 3. The package is abandoned (last release 2015-07-11, last commit 2017-07-19), and Python 3's functools is built-in. For any new project, use Python 3's standard functools directly.

Install

functools32 on PyPI

pip

pip install functools32

uv

uv add functools32

poetry

poetry add functools32

Installing functools32

Before you install

High install friction: package has been abandoned since 2015 (last release 2015-07-11, last commit 2017-07-19) and has not been maintained for over 4052 days. Only relevant for legacy Python 2.7 or PyPy codebases still in active use.

License in practice

Licensed under PSF license (permissive), so no licensing restrictions on use or redistribution.

Quickstart

pip install functools32

from functools import lru_cache

@lru_cache(maxsize=None)
def expensive_function(x):
    return x * 2

Python 2.7 or PyPy only; not compatible with Python 3.x (which has functools built-in).

Verify before relying

  • Whether this package works correctly with modern PyPy versions or only historical ones.
  • Whether any security issues exist in the Python 2.7 functools implementation that have been patched in Python 3.x since the last release.
  • Current status of Python 2.7 support in active projects using this backport.

Package facts

License PSF license (permissive)
Python support not specified
Install friction high — source build required
Runtime dependencies none
Maintenance abandoned — 4,052 days since the last release
Last repo commit
First released
Downloads 371,465/month — #7,170 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: functools32-3.2.3-2.tar.gz; functools32-3.2.3-2.zip

Tags

functools backport python 2.7lru_cache decorator python 2python 3.2 functools python 2least recently used cache pythonfunctools32 lru cachepython 2.7 functools module
python-2-legacybackport

More Software Development packages