linecache2
Backports of the linecache module
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
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 · maintenance · safety
UNKNOWN (permissive) — Licensed under the Python Software Foundation License (permissive), which poses no legal barrier to use.
last release 2015-03-06 (4179 days) · last repo commit 2017-09-01 · 1 stars · archived
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,535,864 downloads/mo, #3,799 on PyPI
Alternatives
Verify before relying
pip install linecache2
import linecache2 as linecache
linecache.getline('path/to/file.py', 1)- 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.
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 on this page. Verify before relying on it.
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
linecache2 on PyPI
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 | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Abandoned 4,179 days since the last release |
| Last repo commit | repository archived |
| First released | |
| Downloads | 1,535,864 / month, #3,799 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 6 - MatureIntended Audience :: DevelopersLicense :: OSI Approved :: Python Software Foundation LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.2Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Topic :: Software Development |
Evidence: linecache2-1.0.0-py2.py3-none-any.whl
Tags
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 › “linecache backport”
- linecache2Provides a backport of Python's linecache module for older Python…
- backports.tarfileProvides a backport of Python's tarfile module for use on Python…
- backports.zstdProvides Zstandard compression support for Python versions before…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also traceback2 · backports.tempfile · inspect2 · contextlib2 · HTMLParser · functools32 · importlib · backports_abc · backports.ssl · weakrefmethod