zope.exceptions
Zope Exceptions
What it is and what it does
zope.exceptions is a utility library that bundles exception classes and formatting tools designed for the Zope web framework ecosystem. It provides TextExceptionFormatter and HTMLExceptionFormatter classes that enhance Python's standard traceback output with better readability, support for custom traceback metadata, and special handling for Zope-specific error contexts. The package is not a framework itself but a foundational component that other Zope packages depend on to standardize exception reporting.
The package depends on setuptools and zope.interface, both of which are lightweight and widely available. It supports Python 3.9 through 3.13 on both CPython and PyPy. The codebase is mature and stable, with a long release history dating back to 2004, though recent development activity is minimal. It carries no known security vulnerabilities.
Use it for:
- Format exception tracebacks into HTML for web error pages in Zope-based applications.
- Enhance text-based exception output with custom metadata and improved readability in server logs.
- Extract and manipulate stack frames programmatically for custom error reporting or monitoring.
- Integrate exception handling into Zope application packages that need consistent error formatting.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides general-purpose exception classes and formatting utilities for Zope applications, including HTML and text exception formatters with enhanced traceback handling.
Yes, if you are building or maintaining a Zope application or a package that depends on zope.exceptions. The package is stable, has no security issues, and installs with low friction. However, if you are starting a new project outside the Zope ecosystem, standard Python exception handling or a more actively maintained alternative may be a better fit. The aging maintenance status means you should not expect rapid bug fixes or feature additions.
Install
zope-exceptions on PyPI
pip
pip install zope-exceptionsuv
uv add zope-exceptionspoetry
poetry add zope-exceptionsInstalling zope.exceptions
Before you install
Low install friction with a pure-Python wheel. Maintenance status is aging—the package last released 336 days ago and has not received recent commits, though the repository remains active and the codebase is stable.
License in practice
Licensed under Zope Public License 2.1 (ZPL-2.1), which is OSI-approved but less common than MIT or Apache 2.0. Verify compatibility with your project's license requirements before use.
Quickstart
pip install zope.exceptions
from zope.exceptions.exceptionformatter import TextExceptionFormatter
formatter = TextExceptionFormatter()
formatted = formatter.formatException(exc_info)
Requires Python 3.9 or later; Python 3.8 is no longer supported as of version 6.0.
Verify before relying
- Whether the package's exception classes integrate well with modern async/await error handling patterns.
- Performance characteristics when formatting very large or deeply nested tracebacks.
- How well the HTML formatter handles edge cases with non-string __traceback_info__ values in production use.
Package facts
| License | ZPL-2.1 (unclear) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — setuptools, zope.interface |
| Maintenance | aging — 336 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 209,887/month — #9,507 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: zope_exceptions-6.0-py3-none-any.whl
Keywords: zope, exceptions
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
zExceptionszExceptions provides a collection of exception…
unclear · top 15,000 on PyPI
zope.deprecationProvides a decorator and utilities to mark…
unclear · top 5,000 on PyPI
zope.testingProvides testing utilities and frameworks for…
unclear · top 15,000 on PyPI
zope.configurationZope.configuration provides an extensible…
unclear · top 5,000 on PyPI
zope.structuredtextParses and renders Zope structured text (STX),…
unclear · top 15,000 on PyPI
zope.browserProvides a set of standard interfaces for…
unclear · top 15,000 on PyPI
zope.proxyzope.proxy provides transparent wrapper objects…
unclear · top 15,000 on PyPI
zope.ptresourceProvides a resource class that processes Zope…
unclear · top 15,000 on PyPI
zope.sizeProvides a standard interface and adapter for…
unclear · top 15,000 on PyPI
zope.datetimeParses and formats date/time strings in common…
unclear · top 15,000 on PyPI