Skip to content

Commit

Permalink
Add support for Python 3.11 and 3.12 and drop EOL 3.7
Browse files Browse the repository at this point in the history
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: sqlalchemy/mako#379
Pull-request-sha: 9f09d4c704ca540f4592d88968fb62609b88ee8f

Change-Id: Ie02118907071ac77cf4975be8affe4b6a2c3d7ad
  • Loading branch information
hugovk authored and zzzeek committed Sep 18, 2023
1 parent 272f5d8 commit 4bb7bb3
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/run-on-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/run-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
8 changes: 6 additions & 2 deletions doc/build/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions doc/build/unreleased/py312.rst
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion mako/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# the MIT License: http://www.opensource.org/licenses/mit-license.php


__version__ = "1.2.5"
__version__ = "1.3.0"
8 changes: 1 addition & 7 deletions mako/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down Expand Up @@ -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"):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ requires = ['setuptools >= 47', 'wheel']

[tool.black]
line-length = 79
target-version = ['py37']
target-version = ['py38']
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 =
Expand Down

0 comments on commit 4bb7bb3

Please sign in to comment.