sphinx-jinja2-compat 0.4.1


pip install sphinx-jinja2-compat

  Latest version

Released: Aug 06, 2025


Meta
Author: Dominic Davis-Foster
Requires Python: >=3.6

Classifiers

Development Status
  • 3 - Alpha

Intended Audience
  • Developers

License
  • OSI Approved :: MIT License

Operating System
  • OS Independent

Programming Language
  • Python
  • Python :: 3 :: Only
  • Python :: 3.7
  • Python :: 3.8
  • Python :: 3.9
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13
  • Python :: Implementation :: CPython
  • Python :: Implementation :: PyPy

Topic
  • Documentation
  • Documentation :: Sphinx
  • Software Development :: Documentation

Patches Jinja2 v3 to restore compatibility with earlier Sphinx versions.

Also makes some Sphinx versions work correctly on Python 3.10.

The patches can be disabled by setting the environment variable NO_SPHINX_JINJA2_COMPAT to 1. (v0.2.0 and newer only)

Tests

Linux Test Status Windows Test Status macOS Test Status

PyPI

PyPI - Package Version PyPI - Supported Python Versions PyPI - Supported Implementations PyPI - Wheel

Anaconda

Conda - Package Version Conda - Platform

Activity

GitHub last commit GitHub commits since tagged version Maintenance PyPI - Downloads

QA

CodeFactor Grade Flake8 Status mypy status

Other

License GitHub top language Requirements Status

Installation

sphinx-jinja2-compat can be installed from PyPI or Anaconda.

To install with pip:

$ python -m pip install sphinx-jinja2-compat

To install with conda:

  • First add the required channels

$ conda config --add channels https://conda.anaconda.org/conda-forge
$ conda config --add channels https://conda.anaconda.org/domdfcoding
  • Then install

$ conda install sphinx-jinja2-compat
Extras: None
Dependencies:
jinja2 (>=2.10)
markupsafe (>=1)
standard-imghdr (==3.10.14)