sphinx-jinja2-compat
Patches Jinja2 v3 to restore compatibility with earlier Sphinx versions.
Decision gist · record as of 2026-08-14
Yes, if you are using Sphinx with Jinja2 v3 and encounter compatibility errors, or if you need Sphinx to work on Python 3.10. The package is actively maintained, has no known vulnerabilities, and installs with low friction. Install only if you actually face the compatibility issues it addresses—it's a targeted fix, not a general dependency.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with a pure-Python wheel.
- Actively maintained as of 2026-07-06 with no known security vulnerabilities.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions—suitable for most projects.
last release 2025-08-06 (373 days) · last repo commit 2026-07-06 · 1 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 658,656 downloads/mo, #5,468 on PyPI
Alternatives
Verify before relying
pip install sphinx-jinja2-compat
import sphinx_jinja2_compat
# Patches are applied automatically on import; disable with NO_SPHINX_JINJA2_COMPAT=1- Which specific Sphinx versions benefit from the Jinja2 v3 compatibility patches
- Whether the Python 3.10 fix applies to all Sphinx versions or only specific ones
- Current test coverage and which Sphinx/Jinja2 version combinations are actively tested
What it is and what it does
sphinx-jinja2-compat is a compatibility shim that automatically patches Jinja2 v3 when imported, allowing it to work with Sphinx versions that were built for earlier Jinja2 releases. It also addresses issues where some Sphinx versions fail to run correctly on Python 3.10. The patches are applied transparently at import time and can be disabled by setting the environment variable NO_SPHINX_JINJA2_COMPAT to 1.
The package depends on jinja2, markupsafe, and standard-imghdr, and is designed to integrate seamlessly into Sphinx documentation builds. It's classified as Alpha but is actively maintained and supports Python 3.6 through 3.13, including both CPython and PyPy implementations.
Use it for
- Fix Sphinx documentation builds that fail after upgrading to Jinja2 v3
- Run Sphinx on Python 3.10 when using Sphinx versions that have compatibility issues
- Maintain documentation builds across multiple Sphinx versions without manual patching
- Ensure legacy Sphinx projects continue to work with modern Jinja2 releases
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are using Sphinx with Jinja2 v3 and encounter compatibility errors, or if you need Sphinx to work on Python 3.10.
The package is actively maintained, has no known vulnerabilities, and installs with low friction. Install only if you actually face the compatibility issues it addresses—it's a targeted fix, not a general dependency.
Install
sphinx-jinja2-compat on PyPI
Before you install
Low install friction with a pure-Python wheel. Actively maintained as of 2026-07-06 with no known security vulnerabilities.
License in practice
MIT license permits commercial and private use with minimal restrictions—suitable for most projects.
Quickstart
pip install sphinx-jinja2-compat
import sphinx_jinja2_compat
# Patches are applied automatically on import; disable with NO_SPHINX_JINJA2_COMPAT=1
Verify before relying
- Which specific Sphinx versions benefit from the Jinja2 v3 compatibility patches
- Whether the Python 3.10 fix applies to all Sphinx versions or only specific ones
- Current test coverage and which Sphinx/Jinja2 version combinations are actively tested
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesjinja2markupsafestandard-imghdr |
| Maintenance | Actively maintained 373 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 658,656 / month, #5,468 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: DocumentationTopic :: Documentation :: SphinxTopic :: Software Development :: Documentation |
Evidence: sphinx_jinja2_compat-0.4.1-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 › “sphinx jinja2 compatibility”
- sphinx-jinja2-compatPatches Jinja2 v3 to restore compatibility with earlier Sphinx…
- pydata-sphinx-themeA Bootstrap-based Sphinx theme that provides a clean, three-column…
- sphinx-jinjaA Sphinx extension that lets you embed Jinja2 templates directly into…
Give your agent the search over MCP, or paste the wish link into any chat.
More Documentation packages
Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.
Sphinx generates professional documentation from reStructuredText source files, producing HTML, PDF, EPUB, and other formats with automatic cross-references, code highlighting, and hierarchical navigation.
Griffe extracts the complete structure and signatures of Python programs to generate API documentation or detect breaking changes in your project's public API.
Install it if you need to programmatically inspect Python code structure, generate API docs, or enforce API stability in CI.
A Sphinx extension that outputs documentation in serialized HTML formats (JSON and pickle) alongside standard HTML.
Alabaster is a clean, responsive Sphinx theme for documentation that requires Python 3.10 or newer and Sphinx 6.2 or newer.
A Sphinx extension that generates HTML help files from reStructuredText documentation source.
See also sphinx-jinja · django-jinja · sphinx-pyproject · jinja2_pluralize · pyramid-jinja2 · sphinx-toolbox · jinja2-simple-tags · types-Jinja2 · jinja2-time · py2neo-history