Skip to content

Commit 4bb7bb3

Browse files
hugovkzzzeek
authored andcommitted
Add support for Python 3.11 and 3.12 and drop EOL 3.7
Mako 1.3.0 bumps the minimum Python version to 3.8, as 3.7 is EOL as of 2023-06-27. Python 3.12 is now supported explicitly. Closes: #379 Pull-request: #379 Pull-request-sha: 9f09d4c Change-Id: Ie02118907071ac77cf4975be8affe4b6a2c3d7ad
1 parent 272f5d8 commit 4bb7bb3

8 files changed

Lines changed: 24 additions & 19 deletions

File tree

.github/workflows/run-on-pr.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ jobs:
2828
# steps to run in each job. Some are github actions, others run shell commands
2929
steps:
3030
- name: Checkout repo
31-
uses: actions/checkout@v2
31+
uses: actions/checkout@v4
3232

3333
- name: Set up python
34-
uses: actions/setup-python@v2
34+
uses: actions/setup-python@v4
3535
with:
3636
python-version: ${{ matrix.python-version }}
3737
architecture: ${{ matrix.architecture }}

.github/workflows/run-test.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ jobs:
2323
- "windows-latest"
2424
- "macos-latest"
2525
python-version:
26-
- "3.7"
2726
- "3.8"
2827
- "3.9"
2928
- "3.10"
29+
- "3.11"
30+
- "3.12"
3031

3132
exclude:
3233
# beaker raises warning on 3.10. only windows seems affected
@@ -39,12 +40,13 @@ jobs:
3940
# steps to run in each job. Some are github actions, others run shell commands
4041
steps:
4142
- name: Checkout repo
42-
uses: actions/checkout@v2
43+
uses: actions/checkout@v4
4344

4445
- name: Set up python
45-
uses: actions/setup-python@v2
46+
uses: actions/setup-python@v4
4647
with:
4748
python-version: ${{ matrix.python-version }}
49+
allow-prereleases: true
4850
architecture: ${{ matrix.architecture }}
4951

5052
- name: Install dependencies

doc/build/changelog.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@
33
Changelog
44
=========
55

6-
1.2
6+
1.3
77
===
88

99
.. changelog::
10-
:version: 1.2.5
10+
:version: 1.3.0
1111
:include_notes_from: unreleased
1212

13+
1.2
14+
===
15+
16+
1317
.. changelog::
1418
:version: 1.2.4
1519
:released: Tue Nov 15 2022

doc/build/unreleased/py312.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.. change::
2+
:tags: change, installation
3+
4+
Mako 1.3.0 bumps the minimum Python version to 3.8, as 3.7 is EOL as of
5+
2023-06-27. Python 3.12 is now supported explicitly.

mako/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# the MIT License: http://www.opensource.org/licenses/mit-license.php
66

77

8-
__version__ = "1.2.5"
8+
__version__ = "1.3.0"

mako/compat.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
# the MIT License: http://www.opensource.org/licenses/mit-license.php
66

77
import collections
8+
from importlib import metadata as importlib_metadata
89
from importlib import util
910
import inspect
1011
import sys
1112

1213
win32 = sys.platform.startswith("win")
1314
pypy = hasattr(sys, "pypy_version_info")
14-
py38 = sys.version_info >= (3, 8)
1515

1616
ArgSpec = collections.namedtuple(
1717
"ArgSpec", ["args", "varargs", "keywords", "defaults"]
@@ -62,12 +62,6 @@ def exception_name(exc):
6262
return exc.__class__.__name__
6363

6464

65-
if py38:
66-
from importlib import metadata as importlib_metadata
67-
else:
68-
import importlib_metadata # noqa
69-
70-
7165
def importlib_metadata_get(group):
7266
ep = importlib_metadata.entry_points()
7367
if hasattr(ep, "select"):

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ requires = ['setuptools >= 47', 'wheel']
44

55
[tool.black]
66
line-length = 79
7-
target-version = ['py37']
7+
target-version = ['py38']

setup.cfg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ classifiers =
1616
Intended Audience :: Developers
1717
Programming Language :: Python
1818
Programming Language :: Python :: 3
19-
Programming Language :: Python :: 3.7
2019
Programming Language :: Python :: 3.8
2120
Programming Language :: Python :: 3.9
2221
Programming Language :: Python :: 3.10
22+
Programming Language :: Python :: 3.11
23+
Programming Language :: Python :: 3.12
2324
Programming Language :: Python :: Implementation :: CPython
2425
Programming Language :: Python :: Implementation :: PyPy
2526
Topic :: Internet :: WWW/HTTP :: Dynamic Content
@@ -29,12 +30,11 @@ project_urls =
2930

3031
[options]
3132
packages = find:
32-
python_requires = >=3.7
33+
python_requires = >=3.8
3334
zip_safe = false
3435

3536
install_requires =
3637
MarkupSafe >= 0.9.2
37-
importlib-metadata;python_version<"3.8"
3838

3939
[options.packages.find]
4040
exclude =

0 commit comments

Comments
 (0)