Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

BOFH excuse #6: global warming


comp / comp.lang.python.announce / [Python-announce] Cheetah 3.4.0

SubjectAuthor
o [Python-announce] Cheetah 3.4.0Oleg Broytman

1
Subject: [Python-announce] Cheetah 3.4.0
From: Oleg Broytman
Newsgroups: comp.lang.python.announce
Date: Mon, 2 Dec 2024 13:22 UTC
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!not-for-mail
From: phd@phdru.name (Oleg Broytman)
Newsgroups: comp.lang.python.announce
Subject: [Python-announce] Cheetah 3.4.0
Date: Mon, 2 Dec 2024 16:22:21 +0300
Lines: 125
Approved: python-announce-list@python.org
Message-ID: <Z020jV1djKNWSQY5@phdru.name>
Reply-To: python-list@python.org
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: news.uni-berlin.de 7FPATWLmQ4is8HRRlPg4rwQ3ce5p4vXtUHd4dfXji/NQ==
Cancel-Lock: sha1:uX10nOFNrZZQ8xlGTYtni2nzFQY= sha256:uKRV/OAcfDIXL/qFeh+vjC4qPdbe4u30e4eOG5lzqXA=
Delivered-To: python-announce-list@x.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=unknown (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.001
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'pip': 0.04; 'absolute':
0.05; 'library.': 0.05; 'pypi': 0.05; 'pep': 0.07; 'template':
0.07; 'tests': 0.07; 'python.': 0.08; 'url:mailman': 0.09; '2.7':
0.09; 'fork': 0.09; 'skip:` 10': 0.09; 'skip:` 20': 0.09; 'to:addr
:python-announce-list': 0.09; 'url-ip:140/8': 0.14; 'import':
0.15; 'announce': 0.15; '$person': 0.16; '3.4': 0.16; '=======':
0.16; 'changes:': 0.16; 'compiled': 0.16; 'expects': 0.16;
'fixes': 0.16; 'inadvertent': 0.16; 'lower.': 0.16; 'practically':
0.16; 'protocol.': 0.16; 'silence': 0.16; 'url-ip:104.18.32/24':
0.16; 'url-ip:172.64.155/24': 0.16; 'url:project': 0.16;
'url:pypi': 0.16; 'python': 0.16; 'developer': 0.16; 'url-
ip:140.82/16': 0.17; 'instead': 0.17; 'bug': 0.19; 'implement':
0.19; 'to:addr:python-list': 0.20; 'exception': 0.22; "what's":
0.22; 'version': 0.23; 'install': 0.23; 'url:github': 0.23; 'run':
0.23; 'code,': 0.31; 'mailing': 0.31; 'raise': 0.31; "doesn't":
0.32; 'dropped': 0.32; 'objects': 0.32; 'programmers': 0.32;
'but': 0.32; "i'm": 0.33; 'release': 0.34; 'final': 0.35; 'files':
0.36; 'cases': 0.36; 'source': 0.36; "it's": 0.37; 'example':
0.37; 'url-ip:151.101.0.223/32': 0.38; 'url-
ip:151.101.128.223/32': 0.38; 'url-ip:151.101.192.223/32': 0.38;
'url-ip:151.101.64.223/32': 0.38; 'both': 0.38; 'use': 0.39;
'two': 0.39; "that's": 0.39; 'single': 0.39; 'url-
ip:185.199.108.153/32': 0.39; 'url-ip:185.199.108/24': 0.39; 'url-
ip:185.199/16': 0.39; 'branch': 0.39; 'hello!': 0.39; 'methods':
0.39; 'case.': 0.40; 'define': 0.40; 'files.': 0.40; 'skip:$ 10':
0.40; 'skip:b 10': 0.63; 'key': 0.64; 'your': 0.64; 'url:4': 0.64;
'url:name': 0.64; 'produce': 0.65; 'news': 0.65; 'pleased': 0.67;
'url:net': 0.67; 'site:': 0.69; 'templates': 0.69; 'url:news':
0.69; 'below': 0.69; 'ignore': 0.71; 'free': 0.71; 'tools': 0.74;
'attribute': 0.84; 'inherit': 0.84; 'spans': 0.84; 'stupid': 0.84;
'url:sourceforge': 0.84; 'caused': 0.86; 'url:p': 0.88; 'return.':
0.91; 'received:89': 0.93
Content-Disposition: inline
X-Attribution: phd
X-Face: "4chVP^f8;3Bi>x"ic0%DuP(ZLyn:;kzQ1njs]5,GRZG<{<\~`|Shxi7|)d|8uO~HFRfyym
{[xs@OYG]2Q]0#}0sjJp`1^1+B6]A2+{9fW=S<O7^"hul]^|AGtiI7SkYF-2VD?UH*h_!zuCIf+^F7
c0x8?W,UfhCAx^YY#1ALhvG\2yG}LW:)zw#1;Yajq"hK~S
X-Operating-System: Debian GNU/Linux
X-Url: https://phdru.name/
Mail-Followup-To: Oleg Broytman <phd@phdru.name>, Python Mailing List
<python-list@python.org>
X-Skip-DKIM-Sig: mailing list
X-MailFrom: phd@phdru.name
X-Mailman-Rule-Hits: emergency
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-python-announce-list.python.org-0; header-match-python-announce-list.python.org-1; header-match-python-announce-list.python.org-2; header-match-python-announce-list.python.org-3; header-match-python-announce-list.python.org-4
Message-ID-Hash: PK5VSVJNUU52VWJ5LSXQUA2XBT5Q4VY3
X-Message-ID-Hash: PK5VSVJNUU52VWJ5LSXQUA2XBT5Q4VY3
X-Mailman-Approved-At: Mon, 02 Dec 2024 09:17:21 -0500
X-Mailman-Version: 3.3.11b1
Precedence: list
List-Id: Announcement-only list for the Python programming language <python-announce-list.python.org>
Archived-At: <https://mail.python.org/archives/list/python-announce-list@python.org/message/PK5VSVJNUU52VWJ5LSXQUA2XBT5Q4VY3/>
List-Archive: <https://mail.python.org/archives/list/python-announce-list@python.org/>
List-Help: <mailto:python-announce-list-request@python.org?subject=help>
List-Owner: <mailto:python-announce-list-owner@python.org>
List-Post: <mailto:python-announce-list@python.org>
List-Subscribe: <mailto:python-announce-list-join@python.org>
List-Unsubscribe: <mailto:python-announce-list-leave@python.org>
View all headers

Hello!

I'm pleased to announce version 3.4.0, the final release
of branch 3.4 of CheetahTemplate3.

What's new in CheetahTemplate3
==============================

This release spans two topics: adapting to Python 3.13 and
fixes in import hooks.

Bug fixes:

- Fixed ``ImportHooks``: it must raise ``ModuleNotFoundError``
instead of ``ImportError``.

- Fixed absolute import in ``ImportHooks`` under Python 3.

- Use ``cache_from_source`` in ``ImportManager`` to find out
``.pyc``/``.pyo`` byte-code files.

- Fixed unmarshalling ``.pyc``/``.pyo`` byte-code files
in ``ImportManager``.

- Fixed ``Template.webInput``: Use ``urllib.parse.parse_qs``
instead of ``cgi.FieldStorage``; Python 3.13 dropped ``cgi``.

- Fixed ``_namemapper.c``: Silent an inadvertent ``TypeError`` exception
in ``PyMapping_HasKeyString`` under Python 3.13+
caused by ``_namemapper`` looking up a key in a non-dictionary.

- Fixed ``_namemapper.c``: Silence ``IndexError`` when testing
``name[attr]``. Some objects like ``re.MatchObject`` implement both
attribute access and index access. This confuses ``NameMapper`` because
it expects ``name[attr]`` to raise ``TypeError`` for objects that don't
implement mapping protocol.

- Fixed mapping test in ``NameMapper.py``:
Python 3.13 brough a new mapping type ``FrameLocalsProxy``.

- Fixed another ``RecursionError`` in ``ImportHooks`` under PyPy3.

Tests:

- tox: Run tests under Python 3.13.

CI:

- CI(GHActions): Switch to ``setup-miniconda``.

- CI(GHActions): Run tests under Python 3.13.

Build/release:

- Rename sdist to lowercase; different build tools produce different case.
This is important because stupid PyPI doesn't ignore sdists
in different cases but also doesn't allow uploading.
So we use single case, all lower. Also see PEP 625.

What is CheetahTemplate3
========================

Cheetah3 is a free and open source (MIT) Python template engine.
It's a fork of the original CheetahTemplate library.

Python 2.7 or 3.4+ is required.

Where is CheetahTemplate3
=========================

Site:
https://cheetahtemplate.org/

Download:
https://pypi.org/project/CT3/3.4.0

News and changes:
https://cheetahtemplate.org/news.html

StackOverflow:
https://stackoverflow.com/questions/tagged/cheetah

Mailing lists:
https://sourceforge.net/p/cheetahtemplate/mailman/

Development:
https://github.com/CheetahTemplate3

Developer Guide:
https://cheetahtemplate.org/dev_guide/

Example
=======

Install::

$ pip install CT3 # (or even "ct3")

Below is a simple example of some Cheetah code, as you can see it's practically
Python. You can import, inherit and define methods just like in a regular Python
module, since that's what your Cheetah templates are compiled to :) ::

#from Cheetah.Template import Template
#extends Template

#set $people = [{'name' : 'Tom', 'mood' : 'Happy'}, {'name' : 'Dick',
'mood' : 'Sad'}, {'name' : 'Harry', 'mood' : 'Hairy'}]

<strong>How are you feeling?</strong>
<ul>
#for $person in $people
<li>
$person['name'] is $person['mood']
</li>
#end for
</ul>

Oleg.
--
Oleg Broytman https://phdru.name/ phd@phdru.name
Programmers don't die, they just GOSUB without RETURN.

1

rocksolid light 0.9.8
clearnet tor