--- id: subprocess32 version: "3.5.4" license: PSF license license_treatment: permissive maintenance: abandoned --- # subprocess32 — A backport of the subprocess module from Python 3 for use on 2.x. License: permissive · Maintenance: abandoned · Downloads: 710.2K/mo ## What it is and what it does subprocess32 is a backport of Python 3's subprocess module for Python 2, designed to bring reliability improvements and modern APIs to older Python environments on POSIX systems. It includes a C extension that handles the fork/exec code path safely in multithreaded applications, addressing concurrency bugs present in Python 2's standard subprocess. The package backports timeout support from Python 3.3 and the run() API from Python 3.5, while keeping other features frozen at Python 3.2 level. This package is intended as a drop-in replacement for Python 2's subprocess module on POSIX platforms (Linux, macOS, BSD, Solaris). However, the project is now abandoned—the repository was archived in 2020 and the last release was in May 2019. Python 2 itself reached end-of-life years ago, making this package primarily useful only for maintaining legacy Python 2 codebases that cannot be migrated. Use it for: - Fixing concurrency bugs in legacy Python 2.7 applications that spawn subprocesses from multithreaded code. - Adding timeout support to subprocess calls in Python 2.6 or 2.7 without upgrading to Python 3. - Providing a unified subprocess API across Python 2 and 3 for codebases that must support both versions. - Replacing Python 2's built-in subprocess module on POSIX systems to gain thread-safe fork/exec handling. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A backport of Python 3's subprocess module to Python 2, with thread-safe fork/exec handling and timeout support for POSIX systems. No, unless you are maintaining a legacy Python 2 codebase that cannot be migrated. The project is abandoned, the repository archived, and Python 2 itself is long past end-of-life. The C extension may not compile on modern build systems. If you control the codebase, upgrade to Python 3; if you cannot, use this only as a temporary measure while planning migration. ## Install pip install subprocess32 uv add subprocess32 poetry add subprocess32 ## Installing subprocess32 Before you install: Medium install friction due to compiled C extension. Repository archived since 2020 and project abandoned; last release was 2019-05-20, over 2643 days ago. Not maintained. License in practice: Licensed under PSF license (permissive). No licensing restrictions on use or redistribution. Quickstart: import sys, os if os.name == 'posix' and sys.version_info[0] < 3: import subprocess32 as subprocess else: import subprocess result = subprocess.run(['echo', 'hello'], timeout=5) Python 2 only (2.6, 2.7); requires POSIX platform; C extension compilation needed at install time. Verify before relying: - Whether the C extension compiles cleanly on modern build systems given the 2020 last commit date. - Current status of the archived repository and whether security patches or critical fixes are still available. ## Package facts - License: PSF license (permissive) - Python support: supports_current - Install friction: medium - Maintenance: abandoned - Downloads: 710.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags python 2 subprocess backport, thread-safe subprocess python 2, subprocess timeout python 2, fork exec reliability python 2, posix subprocess python 2.7, python-2-legacy, posix-only [View on SkillFed](https://skillfed.io/packages/subprocess32) · [View on PyPI](https://pypi.org/project/subprocess32/)