{"id":403,"library":"jaraco.functools","title":"jaraco.functools","description":"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.","status":"active","version":"4.4.0","language":"python","source_language":"en","source_url":"https://github.com/jaraco/jaraco.functools","tags":["functools","Python","utilities","jaraco"],"install":[{"cmd":"pip install jaraco.functools","lang":"bash","label":"Install jaraco.functools"}],"dependencies":[],"imports":[{"note":"Ensure correct import path to access FunctionType.","symbol":"FunctionType","correct":"from jaraco.functools import FunctionType"}],"quickstart":{"code":"from jaraco.functools import FunctionType\n\n# Example usage of FunctionType\ndef example_function():\n    pass\n\nprint(isinstance(example_function, FunctionType))  # Output: True","lang":"python","description":"Demonstrates importing and using FunctionType from jaraco.functools."},"warnings":[{"fix":"Update import statement to 'from jaraco.types import FunctionType'.","message":"FunctionType was moved from jaraco.functools to jaraco.types in version 4.0.0.","severity":"breaking","affected_versions":"4.0.0"},{"fix":"Replace 'deprecated_function' with 'new_function'.","message":"The 'deprecated_function' is scheduled for removal in version 5.0.0.","severity":"deprecated","affected_versions":"4.4.0"}],"env_vars":null,"last_verified":"2026-05-12T13:36:12.304Z","next_check":"2026-06-26T00:00:00.000Z","problems":[{"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.","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.","error":"ModuleNotFoundError: No module named 'jaraco.functools'"},{"fix":"Upgrade `jaraco.functools` to version 4.x.x or newer to include the `splat` function: `pip install --upgrade 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.","error":"ImportError: cannot import name 'splat' from 'jaraco.functools'"},{"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()`.","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.","error":"AttributeError: 'function' object has no attribute 'cache_clear'"},{"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.","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.","error":"TypeError: 'CacheDescriptor' object is not callable"}],"ecosystem":"pypi","meta_description":null,"install_score":0,"install_tag":"stale","quickstart_score":0,"quickstart_tag":"stale","pypi_latest":null,"install_checks":{"last_tested":"2026-05-12","tag":"stale","tag_description":"widespread failures or data too old to trust","results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null}]},"quickstart_checks":{"last_tested":"2026-04-23","tag":"stale","tag_description":"widespread failures or data too old to trust","results":[{"runtime":"python:3.10-alpine","exit_code":1},{"runtime":"python:3.10-slim","exit_code":1},{"runtime":"python:3.11-alpine","exit_code":1},{"runtime":"python:3.11-slim","exit_code":1},{"runtime":"python:3.12-alpine","exit_code":1},{"runtime":"python:3.12-slim","exit_code":1},{"runtime":"python:3.13-alpine","exit_code":1},{"runtime":"python:3.13-slim","exit_code":1},{"runtime":"python:3.9-alpine","exit_code":1},{"runtime":"python:3.9-slim","exit_code":1}]}}