PKɚ~T2_sphinx_jinja2_compat.pthimport sphinx_jinja2_compat PK~TZ Z sphinx_jinja2_compat/__init__.py#!/usr/bin/env python3 # # __init__.py """ Patches Jinja2 v3 to restore compatibility with earlier Sphinx versions. """ # # Copyright © 2022 Dominic Davis-Foster # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE # OR OTHER DEALINGS IN THE SOFTWARE. # # stdlib import sys from typing import Any, Callable, List, TypeVar __all__: List[str] = [] __author__: str = "Dominic Davis-Foster" __copyright__: str = "2022 Dominic Davis-Foster" __license__: str = "MIT License" __version__: str = "0.1.2" __email__: str = "dominic@davis-foster.co.uk" F = TypeVar('F', bound=Callable[..., Any]) # 3rd party import markupsafe # noqa: E402 if not hasattr(markupsafe, "soft_unicode"): def soft_unicode(s: Any) -> str: return markupsafe.soft_str(s) markupsafe.soft_unicode = soft_unicode # type: ignore[attr-defined] # 3rd party import jinja2 # noqa: E402 import jinja2.filters # noqa: E402 import jinja2.utils # noqa: E402 if not hasattr(jinja2.filters, "environmentfilter"): def environmentfilter(f: F) -> F: return jinja2.utils.pass_environment(f) jinja2.filters.environmentfilter = environmentfilter # type: ignore[attr-defined] jinja2.environmentfilter = environmentfilter # type: ignore[attr-defined] if not hasattr(jinja2.utils, "contextfunction"): def contextfunction(f: F) -> F: return jinja2.utils.pass_context(f) jinja2.utils.contextfunction = contextfunction # type: ignore[attr-defined] jinja2.contextfunction = contextfunction # type: ignore[attr-defined] # This all has to be up here so it's triggered first. if sys.version_info >= (3, 10): # stdlib import types types.Union = types.UnionType PKɚ~TF[((,sphinx_jinja2_compat-0.1.2.dist-info/LICENSECopyright (c) 2022 Dominic Davis-Foster Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. PKɚ~Tcc-sphinx_jinja2_compat-0.1.2.dist-info/METADATAMetadata-Version: 2.1 Name: sphinx-jinja2-compat Version: 0.1.2 Summary: Patches Jinja2 v3 to restore compatibility with earlier Sphinx versions. Author-email: Dominic Davis-Foster License: MIT Keywords: documentation,jinja2,sphinx Home-page: https://github.com/sphinx-toolbox/sphinx-jinja2-compat Project-URL: Issue Tracker, https://github.com/sphinx-toolbox/sphinx-jinja2-compat/issues Project-URL: Source Code, https://github.com/sphinx-toolbox/sphinx-jinja2-compat Platform: Windows Platform: macOS Platform: Linux Classifier: Development Status :: 3 - Alpha Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: MIT License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Topic :: Documentation Classifier: Topic :: Documentation :: Sphinx Classifier: Topic :: Software Development :: Documentation Requires-Python: >=3.6 Requires-Dist: jinja2>=2.10 Requires-Dist: markupsafe>=1 Description-Content-Type: text/x-rst ===================== sphinx-jinja2-compat ===================== .. start short_desc **Patches Jinja2 v3 to restore compatibility with earlier Sphinx versions.** .. end short_desc .. start shields .. list-table:: :stub-columns: 1 :widths: 10 90 * - Tests - |actions_linux| |actions_windows| |actions_macos| * - PyPI - |pypi-version| |supported-versions| |supported-implementations| |wheel| * - Anaconda - |conda-version| |conda-platform| * - Activity - |commits-latest| |commits-since| |maintained| |pypi-downloads| * - QA - |codefactor| |actions_flake8| |actions_mypy| * - Other - |license| |language| |requires| .. |actions_linux| image:: https://github.com/sphinx-toolbox/sphinx-jinja2-compat/workflows/Linux/badge.svg :target: https://github.com/sphinx-toolbox/sphinx-jinja2-compat/actions?query=workflow%3A%22Linux%22 :alt: Linux Test Status .. |actions_windows| image:: https://github.com/sphinx-toolbox/sphinx-jinja2-compat/workflows/Windows/badge.svg :target: https://github.com/sphinx-toolbox/sphinx-jinja2-compat/actions?query=workflow%3A%22Windows%22 :alt: Windows Test Status .. |actions_macos| image:: https://github.com/sphinx-toolbox/sphinx-jinja2-compat/workflows/macOS/badge.svg :target: https://github.com/sphinx-toolbox/sphinx-jinja2-compat/actions?query=workflow%3A%22macOS%22 :alt: macOS Test Status .. |actions_flake8| image:: https://github.com/sphinx-toolbox/sphinx-jinja2-compat/workflows/Flake8/badge.svg :target: https://github.com/sphinx-toolbox/sphinx-jinja2-compat/actions?query=workflow%3A%22Flake8%22 :alt: Flake8 Status .. |actions_mypy| image:: https://github.com/sphinx-toolbox/sphinx-jinja2-compat/workflows/mypy/badge.svg :target: https://github.com/sphinx-toolbox/sphinx-jinja2-compat/actions?query=workflow%3A%22mypy%22 :alt: mypy status .. |requires| image:: https://dependency-dash.herokuapp.com/github/sphinx-toolbox/sphinx-jinja2-compat/badge.svg :target: https://dependency-dash.herokuapp.com/github/sphinx-toolbox/sphinx-jinja2-compat/ :alt: Requirements Status .. |codefactor| image:: https://img.shields.io/codefactor/grade/github/sphinx-toolbox/sphinx-jinja2-compat?logo=codefactor :target: https://www.codefactor.io/repository/github/sphinx-toolbox/sphinx-jinja2-compat :alt: CodeFactor Grade .. |pypi-version| image:: https://img.shields.io/pypi/v/sphinx-jinja2-compat :target: https://pypi.org/project/sphinx-jinja2-compat/ :alt: PyPI - Package Version .. |supported-versions| image:: https://img.shields.io/pypi/pyversions/sphinx-jinja2-compat?logo=python&logoColor=white :target: https://pypi.org/project/sphinx-jinja2-compat/ :alt: PyPI - Supported Python Versions .. |supported-implementations| image:: https://img.shields.io/pypi/implementation/sphinx-jinja2-compat :target: https://pypi.org/project/sphinx-jinja2-compat/ :alt: PyPI - Supported Implementations .. |wheel| image:: https://img.shields.io/pypi/wheel/sphinx-jinja2-compat :target: https://pypi.org/project/sphinx-jinja2-compat/ :alt: PyPI - Wheel .. |conda-version| image:: https://img.shields.io/conda/v/domdfcoding/sphinx-jinja2-compat?logo=anaconda :target: https://anaconda.org/domdfcoding/sphinx-jinja2-compat :alt: Conda - Package Version .. |conda-platform| image:: https://img.shields.io/conda/pn/domdfcoding/sphinx-jinja2-compat?label=conda%7Cplatform :target: https://anaconda.org/domdfcoding/sphinx-jinja2-compat :alt: Conda - Platform .. |license| image:: https://img.shields.io/github/license/sphinx-toolbox/sphinx-jinja2-compat :target: https://github.com/sphinx-toolbox/sphinx-jinja2-compat/blob/master/LICENSE :alt: License .. |language| image:: https://img.shields.io/github/languages/top/sphinx-toolbox/sphinx-jinja2-compat :alt: GitHub top language .. |commits-since| image:: https://img.shields.io/github/commits-since/sphinx-toolbox/sphinx-jinja2-compat/v0.1.2 :target: https://github.com/sphinx-toolbox/sphinx-jinja2-compat/pulse :alt: GitHub commits since tagged version .. |commits-latest| image:: https://img.shields.io/github/last-commit/sphinx-toolbox/sphinx-jinja2-compat :target: https://github.com/sphinx-toolbox/sphinx-jinja2-compat/commit/master :alt: GitHub last commit .. |maintained| image:: https://img.shields.io/maintenance/yes/2022 :alt: Maintenance .. |pypi-downloads| image:: https://img.shields.io/pypi/dm/sphinx-jinja2-compat :target: https://pypi.org/project/sphinx-jinja2-compat/ :alt: PyPI - Downloads .. end shields Installation -------------- .. start installation ``sphinx-jinja2-compat`` can be installed from PyPI or Anaconda. To install with ``pip``: .. code-block:: bash $ python -m pip install sphinx-jinja2-compat To install with ``conda``: * First add the required channels .. code-block:: bash $ conda config --add channels https://conda.anaconda.org/conda-forge $ conda config --add channels https://conda.anaconda.org/domdfcoding * Then install .. code-block:: bash $ conda install sphinx-jinja2-compat .. end installation PKɚ~TB Y2sphinx_jinja2_compat-0.1.2.dist-info/top_level.txtsphinx_jinja2_compat PKɚ~T5sphinx_jinja2_compat-0.1.2.dist-info/entry_points.txtPKɚ~TTT*sphinx_jinja2_compat-0.1.2.dist-info/WHEELWheel-Version: 1.0 Generator: whey (0.0.17) Root-Is-Purelib: true Tag: py3-none-any PKɚ~T:+sphinx_jinja2_compat-0.1.2.dist-info/RECORD_sphinx_jinja2_compat.pth,sha256=m-JFoQVBTohfRiVZY6q7o5D3mL4OpFktyhPJ-Z-G7G8,28 sphinx_jinja2_compat/__init__.py,sha256=N8J7jlDVwrhjhQ38aLPsa-giJTbZcdd7fiPLH5h2wpw,2650 sphinx_jinja2_compat-0.1.2.dist-info/LICENSE,sha256=vcYl7QVHqsKsQ0daepvB-wZkus6akEGBbqUynXKQ9r8,1064 sphinx_jinja2_compat-0.1.2.dist-info/METADATA,sha256=wVS_Mz86IQvt2uFZa10KHwTLw60uGSZPzQRYSODAuUM,6499 sphinx_jinja2_compat-0.1.2.dist-info/top_level.txt,sha256=HEgs00Gmbh5YSVNlDEj1ML-mGVnAN9HCjR8TE6OjW0U,21 sphinx_jinja2_compat-0.1.2.dist-info/entry_points.txt,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 sphinx_jinja2_compat-0.1.2.dist-info/WHEEL,sha256=Z8ApXUcOYK5VMz9yebTyUF13KAMNT6RSnd-lLcivEVA,84 sphinx_jinja2_compat-0.1.2.dist-info/RECORD,, PKɚ~T2_sphinx_jinja2_compat.pthPK~TZ Z Ssphinx_jinja2_compat/__init__.pyPKɚ~TF[((, sphinx_jinja2_compat-0.1.2.dist-info/LICENSEPKɚ~Tcc-]sphinx_jinja2_compat-0.1.2.dist-info/METADATAPKɚ~TB Y2 )sphinx_jinja2_compat-0.1.2.dist-info/top_level.txtPKɚ~T5p)sphinx_jinja2_compat-0.1.2.dist-info/entry_points.txtPKɚ~TTT*)sphinx_jinja2_compat-0.1.2.dist-info/WHEELPKɚ~T:+_*sphinx_jinja2_compat-0.1.2.dist-info/RECORDPK-