$npx skillfedfor your agent

stopit

Timeout control decorator and context managers, raise any exception in another thread

SkipPyPI UtilitiesReleased Feb 2018233.1K downloads / moGPLv3Source build

Decision gist · record as of 2026-08-14

sdist only — stopit-1.1.2.tar.gz · builds from source
v1.1.2 · released 2018-02-09

No. The package is abandoned (last release 2018-02-09) with no maintenance signal. It relies on CPython-specific internals, does not work on alternative implementations, and has known limitations with GIL-blocking operations and Windows compatibility. For modern Python projects, consider maintained alternatives or the standard library's asyncio timeout mechanisms.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires CPython; will not work on Jython, PyPy, or IronPython.
  • Signal-based timeout control unavailable on Windows.
  • High install friction: the package is abandoned (last release 2018-02-09, 3108 days ago) and has no runtime dependencies.

License · maintenance · safety

GPLv3 (permissive) — Licensed under GPLv3 (permissive treatment noted), which permits use but requires derivative works to be distributed under the same license if distributed at all.

last release 2018-02-09 (3108 days)

0 known vulnerabilities (OSV.dev, 2026-08-14) · 233,110 downloads/mo, #9,046 on PyPI

Verify before relying

import stopit

with stopit.ThreadingTimeout(10) as to_ctx_mgr:
    # code that may take too long
    pass

if to_ctx_mgr.state == to_ctx_mgr.EXECUTED:
    print('Completed within timeout')
  • Whether the package works reliably on Python versions beyond 3.6 despite classifiers listing only up to 3.6.
  • Current status of any known issues with GIL-blocking operations beyond the documented time.sleep() limitation.
  • Whether the abandoned status poses compatibility or security risks for new projects.
Same gist for agents: .md · .json

What it is and what it does

stopit provides two main mechanisms for controlling execution time in Python: context managers and decorators that enforce timeouts on code blocks and function calls. The core capability is raising asynchronous exceptions in other threads, including the main thread, to interrupt long-running operations. It offers ThreadingTimeout (a context manager) and threading_timeoutable (a decorator) for timeout control, plus async_raise for direct thread interruption. The package also provides a TimeoutException that signals when a timeout has occurred.

The package is tightly coupled to CPython's threading implementation and uses low-level APIs that are not available on alternative Python implementations. It has important limitations: it cannot interrupt blocking Python atomic instructions that hold the GIL (such as time.sleep), and signal-based timeout controls do not work on Windows. The package is no longer maintained, with its last release in 2018-02-09.

Use it for

  • Enforce maximum execution time on web request handlers or API calls that might hang indefinitely.
  • Interrupt long-running computations or data processing tasks if they exceed a time budget.
  • Implement watchdog timers for background worker threads that may become stuck.
  • Decorate functions to return a default value if they do not complete within a specified timeout.
  • Control timeout behavior in test suites to fail tests that run longer than expected.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Skip

No.

The package is abandoned (last release 2018-02-09) with no maintenance signal. It relies on CPython-specific internals, does not work on alternative implementations, and has known limitations with GIL-blocking operations and Windows compatibility. For modern Python projects, consider maintained alternatives or the standard library's asyncio timeout mechanisms.

Install

stopit on PyPI

Before you install

High install friction: the package is abandoned (last release 2018-02-09, 3108 days ago) and has no runtime dependencies. Threading-based timeout control relies on CPython-specific low-level APIs and will not work on alternative Python implementations (Jython, PyPy, IronPython). Signal-based timeouts do not work on Windows.

Requires CPython; will not work on Jython, PyPy, or IronPython. Signal-based timeout control unavailable on Windows.

License in practice

Licensed under GPLv3 (permissive treatment noted), which permits use but requires derivative works to be distributed under the same license if distributed at all.

Quickstart

import stopit

with stopit.ThreadingTimeout(10) as to_ctx_mgr:
    # code that may take too long
    pass

if to_ctx_mgr.state == to_ctx_mgr.EXECUTED:
    print('Completed within timeout')

Verify before relying

  • Whether the package works reliably on Python versions beyond 3.6 despite classifiers listing only up to 3.6.
  • Current status of any known issues with GIL-blocking operations beyond the documented time.sleep() limitation.
  • Whether the abandoned status poses compatibility or security risks for new projects.

Package facts

LicenseGPLv3 permissive
Python supportNot specified
Install frictionHigh. Source build required
Runtime dependenciesNone
MaintenanceAbandoned 3,108 days since the last release
First released
Downloads233,110 / month, #9,046 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: Implementation :: CPythonTopic :: Utilities

Evidence: stopit-1.1.2.tar.gz

Tags

Capabilities
timeout context managerthread timeout controlasync exception in threadfunction timeout decoratorstop long-running codethreading timeoutinterrupt thread execution
Topics
threadingtimeout-controlabandoned
PyPI keywords
threadstimeout

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “thread timeout control”

  • stopitProvides context managers and decorators to enforce timeouts on code…
  • func-timeoutRuns any Python function with a specified timeout limit, raising an…
  • timeout-decoratorA decorator that enforces time limits on function execution, raising…

Give your agent the search over MCP, or paste the wish link into any chat.

More Utilities packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
charset-normalizer Worth it
PyPI · Utilities · released Aug 2026

Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.

permissive licensepure Python · 3.7+
1.7Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
Pygments Worth it
PyPI · Utilities · released Mar 2026

Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.

Install it if you need to display or transform source code.

BSD-2-Clausepure Python · 3.9+
1.3Bdownloads / mo
six With conditions
PyPI · Libraries · released Dec 2024

Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.

MITpure Python
1.2Bdownloads / mo

See also func-timeout · timeout-decorator · pytest-timeout · interruptingcow · async-timeout · async-interrupt · Pebble · kthread · jaraco.context · crochet