aiosignal is a Python library designed to manage asynchronous callbacks in asyncio projects. The current version is 1.4.0, released on July 3, 2025. The library has a moderate release cadence, with updates typically occurring annually.
Install & Compatibility
Where this runs
tested against v1.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
muslpy 3.10–3.925 runs
installs and imports cleanly · install 0.0s · import 0.037s · 18.7MB
glibcpy 3.10–3.925 runs
installs and imports cleanly · install 1.7s · import 0.032s · 19MB
17MB installed
● package 17MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Signal
✓ from aiosignal import Signal
✗ from aiosignal.signal import Signal
The correct import is directly from the aiosignal package; importing from submodules is incorrect.
This example demonstrates creating a Signal, registering a callback, freezing the signal, and sending data to the callback.
import asyncio
from aiosignal import Signal
async def callback(data):
print(f'Received data: {data}')
async def main():
signal = Signal(owner=None)
signal.append(callback)
signal.freeze()
await signal.send('Hello, World!')
asyncio.run(main())
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'aiosignal'
The 'aiosignal' package is not installed in the Python environment.
ImportError: cannot import name 'Signal' from 'aiosignal'
The 'Signal' class is not found in the 'aiosignal' module, possibly due to an incorrect import statement or version mismatch.
fixfrom aiosignal import Signal
TypeError: 'Signal' object is not callable
Attempting to call a 'Signal' object as a function, which is not supported.
fixUse 'await signal.send(data)' to trigger callbacks.
AttributeError: 'Signal' object has no attribute 'append'
Trying to use list methods like 'append' on a 'Signal' object, which does not support them.
fixUse 'signal.connect(callback)' to add callbacks.
RuntimeError: Cannot modify frozen signal
Attempting to modify a 'Signal' object after it has been frozen.
fixEnsure modifications are made before calling 'signal.freeze()'.
Audit
Dependencies
frozenlistrequiredRequired for managing immutable lists
typing-extensionsoptionalNeeded for enhanced type hinting in Python versions below 3.13