{"categories":[{"label":"Testing","url":"https://skillfed.io/packages/category/software-development-testing/3"}],"enrichment":{"capability":"Detects leaked asyncio tasks, threads, and event loop blocking in Python code using context managers or decorators, reporting violations with stack traces.","skillfed_tags":["asyncio-testing","resource-leak-detection","debugging"],"use_cases":["Detect unintended asyncio tasks left running after a test or function completes","Catch threads spawned but never properly joined in sync code paths","Identify blocking calls (e.g., time.sleep) that freeze the event loop during async execution","Validate cleanup in async context managers and fixture teardown","Debug resource leaks in long-running async services before deployment"],"what_it_does":"pyleak is a testing and debugging tool that catches resource leaks in Python async code. It provides three main detectors\u2014no_task_leaks, no_thread_leaks, and no_event_loop_blocking\u2014each usable as a context manager or decorator. When a leak or blocking event is detected, the tool reports it with detailed stack traces showing where the resource was created and where it is currently executing. You configure the response via an action parameter: warn (default, issues ResourceWarning), log (writes to logger), cancel (for tasks only), or raise (throws an exception).\n\nThe package is inspired by Go's goleak and targets developers writing asyncio-heavy applications who need to catch unintended resource leaks during testing. It depends on exceptiongroup and sniffio, both lightweight libraries. The tool supports name filtering by exact match or regex pattern for tasks and threads, and optional creation-stack tracking (via monkey-patching) for deeper debugging. It requires Python 3.9 or later.","worth_installing":"Yes, if you write asyncio or threaded code and want automated leak detection during testing. The low install friction and clear API make it straightforward to add to test suites. However, verify the license terms first (currently unclear in the metadata), and note that the project is aging\u2014last release was 197 days ago. Not suitable for production monitoring; use it as a development and testing tool."},"id":"pyleak","links":{"html":"https://skillfed.io/packages/pyleak","md":"https://skillfed.io/packages/pyleak.md","pypi":"https://pypi.org/project/pyleak/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2026-01-29","license_spdx":null,"license_treatment":"unclear","name":"pyleak","python_support":"supports_current","summary":"Detect leaked asyncio tasks, threads, and event loop blocking in Python. Inspired by Go's goleak"},"popularity":{"monthly_downloads":562550,"position":5987,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.2.0"}
