griffe-warnings-deprecated
Griffe extension for `@warnings.deprecated` (PEP 702).
What it is and what it does
griffe-warnings-deprecated is a Griffe extension that recognizes the `@warnings.deprecated` decorator from PEP 702 and renders deprecation notices in generated API documentation. It integrates into Griffe's analysis pipeline to detect deprecated symbols and wrap them in admonitions (styled blocks) that highlight the deprecation status to users reading the docs.
The extension works in three contexts: as a command-line flag to `griffe dump`, as a programmatic loader in Python code, and as a plugin configuration in MkDocs + mkdocstrings. It exposes three configuration options—admonition kind, title, and label—to customize how deprecation notices appear. The single runtime dependency is griffelib, making installation and setup straightforward.
Use it for:
- Automatically surface deprecation warnings in API docs generated from Python source code with PEP 702 markers.
- Configure MkDocs documentation to highlight deprecated functions and classes with custom admonition styling.
- Programmatically load and analyze a Python package while detecting and rendering all deprecation notices.
- Add deprecation labels and notices to generated documentation without manual markup.
- Integrate deprecation visibility into CI/CD pipelines that generate docs from source.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Extends Griffe to recognize and render PEP 702 `@warnings.deprecated` markers in Python code documentation, surfacing deprecation notices during API analysis.
Yes, if you use Griffe or mkdocstrings to generate Python API documentation and want to automatically surface PEP 702 deprecations. Low install friction, active maintenance, no security issues, and permissive license make it a straightforward addition. Skip it if you don't use Griffe or don't rely on `@warnings.deprecated` markers in your codebase.
Install
griffe-warnings-deprecated on PyPI
pip
pip install griffe-warnings-deprecateduv
uv add griffe-warnings-deprecatedpoetry
poetry add griffe-warnings-deprecatedInstalling griffe-warnings-deprecated
Before you install
Low friction: single pure-Python dependency on griffelib, distributed as a wheel. Actively maintained with recent commits; last release 175 days ago.
License in practice
ISC permissive license; no restrictions on commercial or proprietary use.
Quickstart
pip install griffe-warnings-deprecated
import griffe
griffe.load(
"mypackage",
extensions=griffe.load_extensions(
[{"griffe_warnings_deprecated": {"kind": "danger"}}]
)
)
Requires Python 3.10 or later; griffelib must be installed (pulled in automatically).
Verify before relying
- Whether the extension works with all Griffe versions or requires a specific minimum version of griffelib.
- Performance impact when processing large codebases with many deprecated items.
- Compatibility with other Griffe extensions that may also modify admonition rendering.
Package facts
| License | ISC (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — griffelib |
| Maintenance | actively maintained — 175 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 168,576/month — #10,443 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: griffe_warnings_deprecated-1.1.1-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
griffe-typingdocGriffe extension that enables inline…
permissive · top 15,000 on PyPI
griffeGriffe extracts the complete structure and…
permissive · top 1,000 on PyPI
griffe-pydanticExtends Griffe to automatically extract and…
permissive · top 15,000 on PyPI
deprecatProvides a Python decorator to mark functions,…
permissive · top 15,000 on PyPI
zope.deprecationProvides a decorator and utilities to mark…
unclear · top 5,000 on PyPI
griffe2mdGenerates Markdown API documentation from…
permissive · top 15,000 on PyPI
deprecationProvides decorators to automate deprecation…
permissive · top 1,000 on PyPI
flake8-pep585A flake8 plugin that detects and flags…
copyleft · top 15,000 on PyPI
DeprecatedProvides a @deprecated decorator to mark…
permissive · top 1,000 on PyPI
debtcollectorDebtcollector provides Python deprecation…
permissive · top 5,000 on PyPI