Skip to content
Myr

drop support for Python 3.7

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Lord · committed by David Lord · parent de61312 · Browse files · 7 files+7 added−42 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

7 files+7 added−42 removed

  • other:+7 added−42 removed

7 files+7 added−42 removed

modified:.github/workflows/tests.yaml-1 removed
modified:docs/intro.rst+1 added-1 removed
28 unmodified lines
29Installation30------------3132We recommend using the latest version of Python. Jinja supports Python333.7 and newer. We also recommend using a `virtual environment`_ in order333.8 and newer. We also recommend using a `virtual environment`_ in order34to isolate your project dependencies from other projects and the system.3536.. _virtual environment: https://packaging.python.org/tutorials/installing-packages/#creating-virtual-environments37
26 unmodified lines
modified:src/jinja2/debug.py+1 added-20 removed
116 unmodified lines
117 location = "top-level template code"118 elif function.startswith("block_"):119 location = f"block {function[6:]!r}"120121 if sys.version_info >= (3, 8):122 code = code.replace(co_name=location)121 code = code.replace(co_name=location)123 else:124 code = CodeType(125 code.co_argcount,126 code.co_kwonlyargcount,127 code.co_nlocals,128 code.co_stacksize,129 code.co_flags,130 code.co_code,131 code.co_consts,132 code.co_names,133 code.co_varnames,134 code.co_filename,135 location,136 code.co_firstlineno,137 code.co_lnotab,138 code.co_freevars,139 code.co_cellvars,140 )122123 # Execute the new code, which is guaranteed to raise, and return124 # the new traceback without this frame.125 try:
47 unmodified lines
modified:src/jinja2/ext.py+2 added-18 removed
287 unmodified lines
288 def _install_null(self, newstyle: t.Optional[bool] = None) -> None:289 import gettext290291 translations = gettext.NullTranslations()292293 if hasattr(translations, "pgettext"):294 # Python < 3.8295 pgettext = translations.pgettext296 else:297298 def pgettext(c: str, s: str) -> str: # type: ignore[misc]299 return s300301 if hasattr(translations, "npgettext"):302 npgettext = translations.npgettext303 else:304305 def npgettext(c: str, s: str, p: str, n: int) -> str: # type: ignore[misc]306 return s if n == 1 else p307292 self._install_callables(293 gettext=translations.gettext,294 ngettext=translations.ngettext,295 newstyle=newstyle,312 pgettext=pgettext,313 npgettext=npgettext,296 pgettext=translations.pgettext,297 npgettext=translations.npgettext,298 )299300 def _install_callables(301 self,
553 unmodified lines
modified:CHANGES.rst+1 added
3 unmodified lines
4-------------56Unreleased78- Drop support for Python 3.7.9- Use modern packaging metadata with ``pyproject.toml`` instead of ``setup.cfg``.10 :pr:`1793`11- Use ``flit_core`` instead of ``setuptools`` as build backend.12
986 unmodified lines
modified:pyproject.toml+1 added-1 removed
modified:tox.ini+1 added-1 removed
1[tox]2envlist =3 py3{12,11,10,9,8,7}3 py3{12,11,10,9,8}4 pypy3105 style6 typing7 docs
36 unmodified lines