Metadata-Version: 2.4
Name: asyncwise
Version: 0.2.0
Summary: Surfaces silently swallowed asyncio task exceptions
Author: ZUHAYR
Project-URL: Homepage, https://github.com/ZUHAYR-A/asyncwise
Keywords: asyncio,debugging,error-handling
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Development Status :: 3 - Alpha
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Dynamic: license-file

\# asyncwise



Surfaces silently swallowed asyncio task exceptions, the ones that

normally vanish until an object happens to get garbage collected, if

they ever surface at all.



\## Install



&#x20;   pip install asyncwise



\## Usage



&#x20;   import asyncio

&#x20;   from asyncwise import enable



&#x20;   async def main():

&#x20;       enable()

&#x20;       asyncio.create\_task(some\_background\_work())

&#x20;       await asyncio.sleep(1)



&#x20;   asyncio.run(main())



Must be called from inside a running event loop (e.g. inside an async

function), calling it before any loop is running raises a clear error

rather than failing silently.



\## What it catches



Validated against realistic patterns, including:

\- Fire-and-forget tasks created inside request handlers, where the

&#x20; handler returns before the task has a chance to fail

\- Long-running background tasks that fail after running for a while

\- Multiple concurrent failing tasks, each is reported independently

\- Tasks whose reference is held in a variable or list, not just tasks

&#x20; left completely unassigned



\## Example output



&#x20;   ✗ Silent async task failure in 'cleanup-worker'

&#x20;     This exception would normally vanish silently.



&#x20;     Traceback (most recent call last):

&#x20;       ...

&#x20;     RuntimeError: cleanup failed unexpectedly



\## Turning it off



&#x20;   from asyncwise import disable

&#x20;   disable()



\## License



MIT

