Skip to content

Commit 1e439f6

Browse files
committed
Re-land 1.4 modernization; complete pyproject migration
Restores the "modernize for 2026" and "update github files for current python constraints" commits which were reverted from main in 53f2b84 so that the 1.3.12 and 1.3.13 releases could continue from the 1.3 line. This is a revert of that revert, with the 1.3.12 and 1.3.13 changes retained: the backslash path traversal fix for #435 and its test remain in place, and the 3.15 trove classifier added on main is carried over into pyproject.toml. The version is restored to 1.4.0 and a 1.4 section is added to the changelog; the 1.3.13 placeholder is removed, as the next release from this line is 1.4.0. Development of 1.4 continues on main and the rel_1_4 branch is retired. Additionally completes several details of the pyproject migration that were left unfinished: * setup.cfg had been removed entirely, however the test suite reads its [mako_testing] section for the template and module base paths, leaving the suite unable to collect at all. setup.cfg is restored containing only that section, following the same arrangement used by SQLAlchemy and Alembic for [sqla_testing]. * The project license is declared as an SPDX expression rather than a trove classifier, and license-files moves from [tool.setuptools] to [project], removing two setuptools deprecation warnings at build time. Requires setuptools 77.0.0 or greater to build. Fixes #420. * flake8 and black exclusions for mako-generated template modules move into pyproject.toml, rather than being passed on the flake8 command line where they replaced the configured exclusion list entirely. * MANIFEST.in no longer refers to file types that went away with the examples/bench removal. py315: yes Change-Id: Ife930f15b8867d741270606aad7d9784c193ad9d
1 parent b140327 commit 1e439f6

71 files changed

Lines changed: 477 additions & 1354 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
os:
1919
- "ubuntu-latest"
2020
python-version:
21-
- "3.12"
21+
- "3.14"
2222
tox-env:
2323
- ""
2424
- "-e pep8"

‎.github/workflows/run-test.yaml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ jobs:
2323
- "windows-latest"
2424
- "macos-latest"
2525
python-version:
26-
- "3.9"
2726
- "3.10"
2827
- "3.11"
2928
- "3.12"

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@
1414
.tox/
1515
.cache/
1616
.vscode
17+
/examples/wsgi/modules/

‎.pre-commit-config.yaml‎

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,24 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/python/black
5-
rev: 23.9.1
5+
rev: 26.3.1
66
hooks:
77
- id: black
88

99
- repo: https://github.com/sqlalchemyorg/zimports
10-
rev: v0.6.0
10+
rev: v0.7.0
1111
hooks:
1212
- id: zimports
1313

14-
14+
- repo: https://github.com/pycqa/flake8
15+
rev: 7.3.0
16+
hooks:
17+
- id: flake8
18+
entry: python -m flake8p
19+
additional_dependencies:
20+
- flake8-pyproject
21+
- flake8-import-order>=0.19.2
22+
- flake8-builtins
23+
- flake8-rst-docstrings
24+
- pydocstyle
25+
- pygments

‎MANIFEST.in‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
recursive-include doc *.html *.css *.txt *.js *.png *.py Makefile *.rst *.mako
2-
recursive-include examples *.py *.xml *.mako *.myt *.kid *.tmpl
1+
recursive-include doc *.css *.txt *.js *.png *.py Makefile *.rst
2+
recursive-include examples *.py *.html
33
recursive-include test *.py *.html *.mako *.cfg
44

55
include README* AUTHORS LICENSE CHANGES* tox.ini

‎doc/build/changelog.rst‎

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

6-
1.3
6+
1.4
77
===
88

99
.. changelog::
10-
:version: 1.3.13
10+
:version: 1.4.0
1111
:include_notes_from: unreleased
1212

13+
1.3
14+
===
15+
1316
.. changelog::
1417
:version: 1.3.12
1518
:released: Tue Apr 28 2026

‎doc/build/unreleased/420.rst‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.. change::
2+
:tags: bug, installation
3+
:tickets: 420
4+
5+
The project license is now declared as an :pep:`639` SPDX license
6+
expression rather than as a ``License ::`` trove classifier, which is
7+
deprecated by current versions of setuptools. A minimum setuptools
8+
version of 77.0.0 is now required to build Mako from source.

‎doc/build/unreleased/examples.rst‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.. change::
2+
:tags: usecase, examples
3+
4+
The ``examples/bench`` folder has been removed as it used mostly
5+
long-obsolete template engines. The ``examples/wsgi/run_wsgi.py`` example
6+
has been updated to remove the use of the removed-in-Python-3.13 ``cgi``
7+
module, and to be runnable as a module from the project root.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.. change::
2+
:tags: usecase, installation
3+
4+
Minimum MarkupSafe dependency version bumped from 0.9.2 to 2.0.

‎doc/build/unreleased/pep621.rst‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.. change::
2+
:tags: usecase, installation
3+
4+
Project metadata has been migrated to :pep:`621` ``pyproject.toml``-based
5+
configuration. ``setup.cfg`` remains only for the ``[mako_testing]``
6+
section used by Mako's own test suite.

0 commit comments

Comments
 (0)