Bugzilla Automation <[email protected]> has asked freebsd-python (Nobody)
<[email protected]> for maintainer-feedback:
Bug 300121: textproc/py-Tempita: Update to 0.6.0 (0.5.2 imports cgi, removed in
Python 3.13)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=300121
--- Description ---
Tempita 0.5.2 does `import cgi` at the top of tempita/__init__.py and
uses cgi.escape() for HTML quoting. The cgi module was removed in
Python 3.13, so with 3.13 tempita, and every module that imports it,
fails. For example, from devel/py-sqlalchemy-migrate:
$ python3.13 -c 'import migrate.versioning.api'
ModuleNotFoundError: No module named 'cgi'
(raised from tempita/__init__.py, line 34). cgi.escape itself was
already removed in Python 3.8, so html_quote (tempita/__init__.py lines
446 and 449) is broken at runtime on 3.12 as well.
0.6.0 is a Python 3 release by the new upstream (TurboGears). It
replaces cgi.escape() with html.escape(), so the cgi module is no longer
needed, and the local 2to3-style patches (files/patch-setup.py,
files/patch-tempita-__init__.py) can go. The patch:
- updates to 0.6.0 (the distfile is now tempita-0.6.0.tar.gz, hence
DISTNAME)
- updates WWW to https://github.com/TurboGears/tempita
- ships LICENSE (LICENSE_FILE)
- removes the two local patches
The only change in behaviour is that html_quote also escapes ' as
'.
Misc changes:
- the port switches to USE_PYTHON=pep517 (the package metadata becomes
dist-info)
- concurrent is added to USE_PYTHON
- portlint warnings are fixed
Impact: databases/py-sqlalchemy-migrate and www/py-WebError depend on
it. I checked databases/py-sqlalchemy-migrate with this change, with
Python 3.12 and 3.13, from fresh installs: migrate.versioning.api
creates a repository and a script and puts a database under version
control, which renders its Tempita templates, and db_version returns 0.
The check ran with setuptools installed by hand: sqlalchemy-migrate
needs it at run time, but its port does not declare it, which is not
caused by this change. www/py-WebError was not checked: it is proposed
for deprecation and marked BROKEN in its own PR (it imports cgi).
Tested: poudriere bulk on amd64, both with Python 3.12 and with
DEFAULT_VERSIONS+=python=3.13, after the pep517 switch: builds, installs
the package metadata as .dist-info, and the modules import from the
built package (only optional extras are missing).
Changes: https://github.com/TurboGears/tempita/commits/main