--- id: backports-abc version: "0.5" license: UNKNOWN license_treatment: permissive maintenance: abandoned --- # backports_abc — A backport of recent additions to the 'collections.abc' module. License: permissive · Maintenance: abandoned · Downloads: 576.5K/mo ## What it is and what it does backports_abc fills a gap for developers maintaining code that must run on Python 2.x or Python 3.2, where abstract base classes like Coroutine, Generator, and Awaitable did not yet exist in the standard library. Starting in Python 3.3, these classes moved into collections.abc as part of the standard library. This package provides those classes as a fallback import for older interpreters, and includes a patch() function that can inject them into the collections or collections.abc module namespace to make them available through the standard import path. The package has no runtime dependencies and installs with low friction. However, it has been abandoned since 2016 and is only relevant for legacy Python 2 or Python 3.2 codebases. Modern Python versions render it unnecessary. Use it for: - Maintaining a library that must support Python 2.7 while using Coroutine or Generator type hints. - Patching collections.abc in Python 3.2 environments to provide missing abstract base classes. - Conditional imports in compatibility layers that need to work across Python 2, 3.2, and 3.3+. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides backports of abstract base classes (Generator, Coroutine, Awaitable) and related inspect functions from collections.abc for older Python versions that lack them. No, unless you are actively maintaining Python 2.x or Python 3.2 codebases. For any modern Python project (3.3+), these classes are built-in and this package is unnecessary. The package is abandoned and will not receive updates or security patches. If you do need it for legacy support, installation is safe and frictionless, but consider whether the legacy Python version itself is still worth supporting. ## Install pip install backports-abc uv add backports-abc poetry add backports-abc ## Installing backports_abc Before you install: Installation is frictionless with no runtime dependencies. However, the package is abandoned—last commit was 2022-01-29 and no releases since 2016-11-12. It remains stable for its narrow purpose but will not receive updates. License in practice: Licensed under the Python Software Foundation License (permissive). No licensing restrictions on use or redistribution. Quickstart: pip install backports_abc import backports_abc backports_abc.patch() from collections.abc import Coroutine, Generator Primarily useful for Python 2.x and Python 3.2; modern Python versions (3.3+) have these ABCs built-in, making this package unnecessary for current codebases. Verify before relying: - Whether this package is still necessary given that Python 2 reached end-of-life in 2020 and Python 3.2 is no longer supported. - Current real-world usage patterns and whether new projects still depend on it. ## Package facts - License: UNKNOWN (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 576.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags collections.abc backport, coroutine generator abc, python 2 3.2 compatibility, abstract base classes backport, awaitable coroutine inspect, python-2-compat, legacy-support [View on SkillFed](https://skillfed.io/packages/backports-abc) · [View on PyPI](https://pypi.org/project/backports-abc/)