jaraco.functools
raw JSON → 4.4.0 verified Tue May 12 auth: no python install: stale quickstart: stale
Provides additional functools in the spirit of Python's standard library's functools. Current version: 4.4.0, released on December 21, 2025. Maintained by Jason R. Coombs. Requires Python 3.9 or higher. Release cadence: approximately every 3-4 months.
pip install jaraco.functools Common errors
error ModuleNotFoundError: No module named 'jaraco.functools' ↓
cause This error typically occurs when the 'jaraco.functools' package is not installed in the Python environment, or if there are issues with package resolution, especially in bundled applications (like those created with py2exe/PyInstaller) or when dealing with namespace packages.
fix
Ensure the package is installed using pip:
pip install jaraco.functools or if using a package manager like pacman, install python-jaraco.functools. For bundled applications, ensure the packaging tool correctly includes all namespace package components. error ImportError: cannot import name 'splat' from 'jaraco.functools' ↓
cause This specific ImportError arises when a dependent library (such as `setuptools` versions 75.x.x) tries to import the `splat` function, which was introduced in `jaraco.functools` version 4.x.x, but an older version of `jaraco.functools` (e.g., prior to 4.x.x) is installed in the environment.
fix
Upgrade
jaraco.functools to version 4.x.x or newer to include the splat function: pip install --upgrade jaraco.functools. error AttributeError: 'function' object has no attribute 'cache_clear' ↓
cause This error occurs when attempting to call `cache_clear()` on a method decorated with `jaraco.functools.method_cache` before that method has been invoked at least once on an instance, meaning the cache mechanism hasn't been initialized or attached to the instance yet.
fix
Ensure the decorated method has been called at least once on the instance before attempting to clear its cache. For example:
my_instance.my_method(); my_instance.my_method.cache_clear(). error TypeError: 'CacheDescriptor' object is not callable ↓
cause This error occurs when the `@property` decorator is applied to a method that is also decorated with `jaraco.functools.method_cache`. This combination can lead to a conflict because both are descriptors, and `@property` does not chain the descriptor protocol correctly with `method_cache` in older versions.
fix
Avoid using
@property directly on methods decorated with method_cache. If caching a property's value is needed, consider implementing the caching logic within the property's getter method manually or upgrading to a version of jaraco.functools (or Python) where this interaction is resolved or better supported. For current versions of jaraco.functools, method_cache is designed to work with methods, not properties directly. Warnings
breaking FunctionType was moved from jaraco.functools to jaraco.types in version 4.0.0. ↓
fix Update import statement to 'from jaraco.types import FunctionType'.
deprecated The 'deprecated_function' is scheduled for removal in version 5.0.0. ↓
fix Replace 'deprecated_function' with 'new_function'.
Install compatibility stale last tested: 2026-05-12
python os / libc status wheel install import disk
3.10 alpine (musl) - - - -
3.10 slim (glibc) - - - -
3.11 alpine (musl) - - - -
3.11 slim (glibc) - - - -
3.12 alpine (musl) - - - -
3.12 slim (glibc) - - - -
3.13 alpine (musl) - - - -
3.13 slim (glibc) - - - -
3.9 alpine (musl) - - - -
3.9 slim (glibc) - - - -
Imports
- FunctionType
from jaraco.functools import FunctionType
Quickstart stale last tested: 2026-04-23
from jaraco.functools import FunctionType
# Example usage of FunctionType
def example_function():
pass
print(isinstance(example_function, FunctionType)) # Output: True