--- id: linecache2 version: "1.0.0" license: UNKNOWN license_treatment: permissive maintenance: abandoned --- # linecache2 — Backports of the linecache module License: permissive · Maintenance: abandoned · Downloads: 1.5M/mo ## What it is and what it does linecache2 is a backport of Python's standard linecache module designed for Python 2.6, 2.7, and Python 3.2, 3.3, 3.4. It provides the same interface as the standard library's linecache, which caches and retrieves lines from source files—useful for tools that need to display or inspect source code at runtime, such as debuggers, profilers, and error handlers. The package has been unmaintained since its last commit on 2017-09-01 and its repository is archived. It exists primarily for legacy codebases still running on Python 2 or very early Python 3 versions. Installation is straightforward with no external dependencies. Use it for: - Debugging tools or error handlers on Python 2.7 that need to retrieve and display source code lines. - Profilers or tracing utilities targeting Python 2.6–3.4 that require cached line information. - Legacy application maintenance when upgrading linecache functionality is not feasible. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a backport of Python's linecache module for older Python versions, allowing code to access cached line information from source files across Python 2 and early Python 3 releases. No. The package targets Python versions that are no longer supported and has been abandoned since 2017-09-01. Modern Python includes linecache in the standard library. Install only if maintaining a legacy codebase on Python 2.6, 2.7, 3.2, 3.3, or 3.4 that explicitly requires this backport. ## Install pip install linecache2 uv add linecache2 poetry add linecache2 ## Installing linecache2 Before you install: Installation is frictionless with no runtime dependencies, but the package has been abandoned since 2017-09-01 and its repository is archived. License in practice: Licensed under the Python Software Foundation License (permissive), which poses no legal barrier to use. Quickstart: pip install linecache2 import linecache2 as linecache linecache.getline('path/to/file.py', 1) Verify before relying: - Whether linecache2 is still necessary given that Python 2.6, 2.7, 3.2, 3.3, and 3.4 are no longer officially supported. - Whether the backported implementation matches current linecache behavior in modern Python versions. ## Package facts - License: UNKNOWN (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 1.5M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags linecache backport, python 2 linecache, source line caching, legacy python compatibility, file line access cache, python 2.6 2.7 support, legacy, python-2 [View on SkillFed](https://skillfed.io/packages/linecache2) · [View on PyPI](https://pypi.org/project/linecache2/)