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
Provenance
- Commit
fcd3d3b- Tree
6c961dd- Author
David Lord <davidism@gmail.com>- Committer
David Lord <davidism@gmail.com>- Parent
de61312
7 files changed+7 added−42 removed
modified:.github/workflows/tests.yaml-1 removed
26 unmodified lines27282930313132333423 unmodified lines26 unmodified lines - {python: '3.11'} - {python: '3.10'} - {python: '3.9'} - {python: '3.8'} - {python: '3.7'} - {name: PyPy, python: 'pypy-3.10', tox: pypy310} steps: - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.023 unmodified linesmodified:docs/intro.rst+1 added-1 removed
28 unmodified lines29 Installation30 ------------31 32 We recommend using the latest version of Python. Jinja supports Python33-3.7 and newer. We also recommend using a `virtual environment`_ in order33+3.8 and newer. We also recommend using a `virtual environment`_ in order34 to isolate your project dependencies from other projects and the system.35 36 .. _virtual environment: https://packaging.python.org/tutorials/installing-packages/#creating-virtual-environments37 26 unmodified linesmodified:src/jinja2/debug.py+1 added-20 removed
116 unmodified lines117 location = "top-level template code"118 elif function.startswith("block_"):119 location = f"block {function[6:]!r}"120 121- 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- )122 123 # Execute the new code, which is guaranteed to raise, and return124 # the new traceback without this frame.125 try:47 unmodified linesmodified:src/jinja2/ext.py+2 added-18 removed
287 unmodified lines288 def _install_null(self, newstyle: t.Optional[bool] = None) -> None:289 import gettext290 291 translations = gettext.NullTranslations()292-293- if hasattr(translations, "pgettext"):294- # Python < 3.8295- pgettext = translations.pgettext296- else:297-298- def pgettext(c: str, s: str) -> str: # type: ignore[misc]299- return s300-301- if hasattr(translations, "npgettext"):302- npgettext = translations.npgettext303- else:304-305- def npgettext(c: str, s: str, p: str, n: int) -> str: # type: ignore[misc]306- return s if n == 1 else p307-292 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 )299 300 def _install_callables(301 self,553 unmodified linesmodified:CHANGES.rst+1 added
3 unmodified lines4 -------------5 6 Unreleased7 8+- 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 linesmodified:pyproject.toml+1 added-1 removed
13 unmodified lines1415161718181920212279 unmodified lines13 unmodified lines "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Text Processing :: Markup :: HTML", "Typing :: Typed",]requires-python = ">=3.7"requires-python = ">=3.8"dependencies = ["MarkupSafe>=2.0"]dynamic = ["version"]
[project.urls]79 unmodified linesmodified:tox.ini+1 added-1 removed
1 [tox]2 envlist =3- py3{12,11,10,9,8,7}3+ py3{12,11,10,9,8}4 pypy3105 style6 typing7 docs36 unmodified lines