summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo van Kemenade <hugovk@users.noreply.github.com>2023-09-16 17:20:56 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2023-09-18 16:21:08 -0400
commit4bb7bb3193b1962b2ed7972983ed9d7d63fe3a20 (patch)
treea530760dac3206fc39860e3d747ca8028292affa
parent272f5d8cc97aee829e3b285486f33c9c8e604c74 (diff)
downloadmako-4bb7bb3193b1962b2ed7972983ed9d7d63fe3a20.tar.gz
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: https://github.com/sqlalchemy/mako/pull/379 Pull-request-sha: 9f09d4c704ca540f4592d88968fb62609b88ee8f Change-Id: Ie02118907071ac77cf4975be8affe4b6a2c3d7ad
-rw-r--r--.github/workflows/run-on-pr.yaml4
-rw-r--r--.github/workflows/run-test.yaml8
-rw-r--r--doc/build/changelog.rst8
-rw-r--r--doc/build/unreleased/py312.rst5
-rw-r--r--mako/__init__.py2
-rw-r--r--mako/compat.py8
-rw-r--r--pyproject.toml2
-rw-r--r--setup.cfg6
8 files changed, 24 insertions, 19 deletions
diff --git a/.github/workflows/run-on-pr.yaml b/.github/workflows/run-on-pr.yaml
index 9b8b545..fa6c759 100644
--- a/.github/workflows/run-on-pr.yaml
+++ b/.github/workflows/run-on-pr.yaml
@@ -28,10 +28,10 @@ jobs:
# steps to run in each job. Some are github actions, others run shell commands
steps:
- name: Checkout repo
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
- name: Set up python
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
diff --git a/.github/workflows/run-test.yaml b/.github/workflows/run-test.yaml
index 60307ea..88e5a96 100644
--- a/.github/workflows/run-test.yaml
+++ b/.github/workflows/run-test.yaml
@@ -23,10 +23,11 @@ jobs:
- "windows-latest"
- "macos-latest"
python-version:
- - "3.7"
- "3.8"
- "3.9"
- "3.10"
+ - "3.11"
+ - "3.12"
exclude:
# beaker raises warning on 3.10. only windows seems affected
@@ -39,12 +40,13 @@ jobs:
# steps to run in each job. Some are github actions, others run shell commands
steps:
- name: Checkout repo
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
- name: Set up python
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
+ allow-prereleases: true
architecture: ${{ matrix.architecture }}
- name: Install dependencies
diff --git a/doc/build/changelog.rst b/doc/build/changelog.rst
index 98f7423..eb0e2b9 100644
--- a/doc/build/changelog.rst
+++ b/doc/build/changelog.rst
@@ -3,13 +3,17 @@
Changelog
=========
-1.2
+1.3
===
.. changelog::
- :version: 1.2.5
+ :version: 1.3.0
:include_notes_from: unreleased
+1.2
+===
+
+
.. changelog::
:version: 1.2.4
:released: Tue Nov 15 2022
diff --git a/doc/build/unreleased/py312.rst b/doc/build/unreleased/py312.rst
new file mode 100644
index 0000000..e111845
--- /dev/null
+++ b/doc/build/unreleased/py312.rst
@@ -0,0 +1,5 @@
+.. change::
+ :tags: change, installation
+
+ 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.
diff --git a/mako/__init__.py b/mako/__init__.py
index 8f2d359..25d577d 100644
--- a/mako/__init__.py
+++ b/mako/__init__.py
@@ -5,4 +5,4 @@
# the MIT License: http://www.opensource.org/licenses/mit-license.php
-__version__ = "1.2.5"
+__version__ = "1.3.0"
diff --git a/mako/compat.py b/mako/compat.py
index ae118ca..4de11c5 100644
--- a/mako/compat.py
+++ b/mako/compat.py
@@ -5,13 +5,13 @@
# the MIT License: http://www.opensource.org/licenses/mit-license.php
import collections
+from importlib import metadata as importlib_metadata
from importlib import util
import inspect
import sys
win32 = sys.platform.startswith("win")
pypy = hasattr(sys, "pypy_version_info")
-py38 = sys.version_info >= (3, 8)
ArgSpec = collections.namedtuple(
"ArgSpec", ["args", "varargs", "keywords", "defaults"]
@@ -62,12 +62,6 @@ def exception_name(exc):
return exc.__class__.__name__
-if py38:
- from importlib import metadata as importlib_metadata
-else:
- import importlib_metadata # noqa
-
-
def importlib_metadata_get(group):
ep = importlib_metadata.entry_points()
if hasattr(ep, "select"):
diff --git a/pyproject.toml b/pyproject.toml
index b3193b9..320d94a 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,4 +4,4 @@ requires = ['setuptools >= 47', 'wheel']
[tool.black]
line-length = 79
-target-version = ['py37']
+target-version = ['py38']
diff --git a/setup.cfg b/setup.cfg
index 09d84fd..f643d01 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -16,10 +16,11 @@ classifiers =
Intended Audience :: Developers
Programming Language :: Python
Programming Language :: Python :: 3
- Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
+ Programming Language :: Python :: 3.11
+ Programming Language :: Python :: 3.12
Programming Language :: Python :: Implementation :: CPython
Programming Language :: Python :: Implementation :: PyPy
Topic :: Internet :: WWW/HTTP :: Dynamic Content
@@ -29,12 +30,11 @@ project_urls =
[options]
packages = find:
-python_requires = >=3.7
+python_requires = >=3.8
zip_safe = false
install_requires =
MarkupSafe >= 0.9.2
- importlib-metadata;python_version<"3.8"
[options.packages.find]
exclude =