Install & Compatibility
Where this runs
tested against v0.4.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
py 3.9
✕ build_error
✕ build_error
15MB installed
● package 15MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
call
✓ from uncalled_for import call
✗ from uncalled_for import call
This example demonstrates how to define an asynchronous dependency using an async generator, and then use `uncalled_for.call` to automatically resolve and inject this dependency into another asynchronous function. The `get_db_connection` acts as a context manager, ensuring resource cleanup.
import asyncio
from uncalled_for import call
# Define an async generator for a mock database connection
async def get_db_connection():
print("Connecting to DB...")
try:
# Simulate a connection object
yield "mock_db_connection_obj"
finally:
print("Closing DB connection...")
# Define a function that depends on the database connection
async def get_user_data(db_connection: str):
print(f"Fetching user data using: {db_connection}")
await asyncio.sleep(0.1) # Simulate async I/O
return f"User data fetched with {db_connection}"
# Define the main application function
async def main_app_logic():
# 'call' resolves get_db_connection and injects its yielded value into get_user_data
data = await call(get_user_data, db_connection=get_db_connection)
print(f"Received: {data}")
if __name__ == "__main__":
asyncio.run(main_app_logic())
Debug
Known issues
breakingThe `__aexit__` signature for custom `Dependency` classes changed between versions 0.1.0 and 0.1.1. If you implemented custom asynchronous dependencies, ensure their `__aexit__` method matches the full expected signature.fixUpdate the `__aexit__` method signature in your custom asynchronous `Dependency` implementations to `async def __aexit__(self, exc_type, exc_val, exc_tb):`.
affects: 0.1.0
gotchaAs of version 0.1.2, the library reports concrete types for duplicate single dependencies. This change might alter behavior or error reporting if your application previously had ambiguously defined duplicate dependencies that were implicitly resolved.fixReview your dependency definitions to ensure uniqueness where intended or explicitly define how duplicate dependencies should be resolved.
affects: >=0.1.2
gotchaThe library explicitly requires Python 3.10 or newer. Using it with older Python versions will result in `SyntaxError` or `ImportError` due to modern language features utilized.fixEnsure your project's Python interpreter is version 3.10 or higher. You may need to upgrade your Python environment or use a tool like `pyenv` or `conda` to manage different Python versions.
affects: <3.10
gotchaAs an async-native library built on `AsyncExitStack` and `ContextVar`, proper asynchronous context management is crucial. Misunderstanding `await` usage or resource lifecycle in async generators can lead to unclosed resources or unexpected behavior.fixAlways `await` calls to functions decorated or managed by `uncalled-for` if they involve async dependencies. Ensure any custom async generators used as dependencies properly `yield` and handle their `finally` blocks for resource cleanup.
affects: All versions
breakingThe `call` function is no longer available for direct import from the `uncalled_for` package's top level. This indicates a breaking API change where the function has either been removed, renamed, or moved to a different module.fixUpdate your import statements and code to reflect the library's current API for its primary callable functionality. Refer to the library's changelog or documentation to identify the new entry point or alternative method for the `call` functionality.
affects: Specific library versions (where 'call' is not exported)
Upgrade
Version history
0.4.0latest on PyPI · released Aug 10, 2026
Audit
Dependencies
No dependency data recorded yet.