$npx skillfedfor your agent

exceptiongroup

Backport of PEP 654 (exception groups)

Worth itPyPI Released Nov 2025331.4M downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — exceptiongroup-1.3.1-py3-none-any.whl
v1.3.1 · released 2025-11-21 · Python >=3.7 · 1 runtime deps: typing-extensions

Yes. This is a stable, actively maintained backport of a standard library feature with zero known vulnerabilities, low install friction, and permissive licensing. Install it if you need exception group support on Python versions before 3.11; on Python 3.11 or later it transparently delegates to built-in implementations, so there is no downside to including it for cross-version compatibility.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.7 or later; on Python 3.11 or later the package uses built-in implementations instead of backports.
  • Low friction: pure Python wheel with a single lightweight dependency (typing-extensions).
  • Actively maintained with recent commits; no known vulnerabilities.

License · maintenance · safety

permissive license (permissive) — MIT license (permissive) — you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

last release 2025-11-21 (266 days) · last repo commit 2026-07-06 · 49 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 331,427,391 downloads/mo, #127 on PyPI

Verify before relying

pip install exceptiongroup

from exceptiongroup import BaseExceptionGroup, catch

def handler(excgroup: BaseExceptionGroup) -> None:
    for exc in excgroup.exceptions:
        print(f'Caught: {type(exc).__name__}')

with catch({ValueError: handler}):
    raise ExceptionGroup('errors', [ValueError('test')])
  • Whether the monkey patching of TracebackException and sys.excepthook can conflict with other exception hooks in production environments.
  • Performance impact of the catch() context manager compared to native except* syntax on Python 3.11 or later.
Same gist for agents: .md · .json

What it is and what it does

This package backports Python 3.11's exception group functionality to earlier Python versions. Exception groups allow you to raise and handle multiple exceptions together, which is useful when an operation fails in multiple ways simultaneously. The package provides the BaseExceptionGroup and ExceptionGroup classes, a catch() context manager for handling grouped exceptions (since the except* syntax is not available before Python 3.11), and a suppress() context manager that can suppress exceptions even when nested inside groups.

On import, the package patches the traceback module and installs an exception hook to ensure exception groups format correctly in tracebacks. On Python 3.11 or later, it uses the built-in implementations and skips patching. The package has one runtime dependency (typing-extensions) and installs as a pure Python wheel, making it lightweight and low-friction to add to any project targeting older Python versions.

Use it for

  • Backport exception group handling to codebases that need to catch and process multiple concurrent errors.
  • Use catch() to handle exceptions that may be nested inside exception groups, replacing the except* syntax for pre-3.11 Python.
  • Suppress specific exception types within exception groups using the backported suppress() context manager.
  • Ensure exception groups render correctly in tracebacks and logs on Python versions before 3.11.
  • Build libraries that need to work across Python 3.7 or later while using exception group semantics uniformly.

Worth the install?

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

Worth it

Yes.

This is a stable, actively maintained backport of a standard library feature with zero known vulnerabilities, low install friction, and permissive licensing. Install it if you need exception group support on Python versions before 3.11; on Python 3.11 or later it transparently delegates to built-in implementations, so there is no downside to including it for cross-version compatibility.

Install

exceptiongroup on PyPI

Before you install

Low friction: pure Python wheel with a single lightweight dependency (typing-extensions). Actively maintained with recent commits; no known vulnerabilities.

Requires Python 3.7 or later; on Python 3.11 or later the package uses built-in implementations instead of backports.

License in practice

MIT license (permissive) — you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

Quickstart

pip install exceptiongroup

from exceptiongroup import BaseExceptionGroup, catch

def handler(excgroup: BaseExceptionGroup) -> None:
    for exc in excgroup.exceptions:
        print(f'Caught: {type(exc).__name__}')

with catch({ValueError: handler}):
    raise ExceptionGroup('errors', [ValueError('test')])

Verify before relying

  • Whether the monkey patching of TracebackException and sys.excepthook can conflict with other exception hooks in production environments.
  • Performance impact of the catch() context manager compared to native except* syntax on Python 3.11 or later.

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.7
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
typing-extensions
MaintenanceActively maintained 266 days since the last release
Last repo commit
First released
Downloads331,427,391 / month, #127 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 LicenseProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyTyping :: Typed

Evidence: exceptiongroup-1.3.1-py3-none-any.whl

Tags

Capabilities
exception groups pythonhandle multiple exceptionsPEP 654 backportnested exception handlingexception group catchsuppress exceptions in groupstraceback exception formatting
Topics
exception-handlingbackportpep-654

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 › “exception groups python”

  • exceptiongroupProvides exception group classes and utilities for handling multiple…
  • taskgroupBackports asyncio.TaskGroup, asyncio.Runner, and asyncio.timeout from…
  • rollbarSends exceptions, errors, and log messages to Rollbar's error…

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

Similar packages

backports_abc Skip
PyPI · Software Development · released Nov 2016

Provides backports of abstract base classes (Generator, Coroutine, Awaitable) and related inspect functions from collections.abc for older Python versions that lack them.

permissive licensepure Pythonabandoned
576.5Kdownloads / mo
pickle5 Skip
PyPI · Software Development · released Nov 2021

Backports the pickle 5 protocol (PEP 574) and related pickle module improvements from Python 3.8.3 to earlier Python versions, allowing use of protocol 5 features on Python 3.5, 3.6, and 3.7.

permissive licensecompiled wheelabandoned
108.7Kdownloads / mo
stackprinter Worth it
PyPI · Quality Assurance · released Apr 2026

Replaces Python's default exception traceback with an enhanced version that shows surrounding code context and the values of nearby variables at each stack frame.

Install it if you spend time debugging Python code or need better error context in production logs—it's a low-risk, high-value addition to any Python project.

MITpure Python · 3.4+
444.7Kdownloads / mo
multiprocessing Skip
PyPI · Python Modules · released Jul 2009

Backport of Python 2.6/3.0 multiprocessing to Python 2.4 and 2.5, enabling process-based parallelism on older Python versions.

Install only if you are maintaining a legacy system on Python 2.4 or 2.5 that cannot be upgraded; otherwise, use the built-in multiprocessing module.

BSD-3-Clausebuilds from sourceabandoned
122.6Kdownloads / mo
eval-type-backport With conditions
PyPI · released Jun 2026

Enables newer Python typing syntax (like `X | Y` and `list[X]`) to work in older Python versions by transforming them into their `typing` module equivalents at runtime.

Install it if your project's Python support matrix spans pre-3.10 versions.

MITpure Python · 3.7+
36.6Mdownloads / mo
tblib With conditions
PyPI · Utilities · released Nov 2025

Serializes exceptions and tracebacks to pickle format or plain dicts, enabling exception handling across multiple processes without losing stack information.

BSD-2-Clausepure Python · 3.9+aging
32.8Mdownloads / mo

See also crashtest · backports.weakref · traceback2 · cli-exit-tools