functools32
Backport of the functools module from Python 3.2.3 for use on 2.7 and PyPy.
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 functools32uv
uv add functools32poetry
poetry add functools32Installing 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
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
backports.functools-lru-cacheProvides the lru_cache decorator from Python…
permissive · top 5,000 on PyPI
cachetoolsProvides memoizing collections and function…
permissive · top 1,000 on PyPI
methodtoolsProvides LRU caching for methods, classmethods,…
permissive · top 5,000 on PyPI
async-lruAn LRU cache decorator for async functions that…
permissive · top 1,000 on PyPI
linecache2Provides a backport of Python's linecache…
permissive · top 5,000 on PyPI
pylruProvides a pure-Python LRU (least recently…
permissive · top 15,000 on PyPI
memoizationDecorator-based function result caching with…
permissive · top 5,000 on PyPI
singledispatchProvides single-dispatch generic functions—a…
permissive · top 5,000 on PyPI
subprocess32A backport of Python 3's subprocess module to…
permissive · top 15,000 on PyPI
fastcorefastcore extends Python with functional…
permissive · top 1,000 on PyPI