Chameleon

Latest version: v4.6.0

Safety actively analyzes 693883 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 14 of 19

2.4.3

------------------

Features:

- When an encoding is provided, pass the 'ignore' flag to avoid
decoding issues with bad input.

Bugfixes:

- Fixed pypy compatibility issue (introduced in previous release).

2.4.2

------------------

Bugfixes:

- Fixed an issue in the compiler where an internal variable (such as a
translation default value) would be cached, resulting in variable
scope corruption (see issue 49).

2.4.1

------------------

Bugfixes:

- Fixed an issue where a default value for an attribute would
sometimes spill over into another attribute.

- Fixed issue where the use of the ``default`` name in an attribute
interpolation expression would print the attribute value. This is
unexpected, because it's an expression, not a static text suitable
for output. An attribute value of ``default`` now correctly drops
the attribute.

2.4.0

------------------

Features:

- Added an option ``boolean_attributes`` to evaluate and render a
provided set of attributes using a boolean logic: if the attribute
is a true value, the value will be the attribute name, otherwise the
attribute is dropped.

In the reference implementation, the following attributes are
configured as boolean values when the template is rendered in
HTML-mode::

"compact", "nowrap", "ismap", "declare", "noshade",
"checked", "disabled", "readonly", "multiple", "selected",
"noresize", "defer"

Note that in Chameleon, these attributes must be manually provided.

Bugfixes:

- The carriage return character (used on Windows platforms) would
incorrectly be included in Python comments.

It is now replaced with a line break.

This fixes issue 44.

2.3.8

------------------

- Fixed import error that affected Python 2.5 only.

2.3.7

------------------

Features:

- Added an option ``literal_false`` that disables the default behavior
of dropping an attribute for a value of ``False`` (in addition to
``None``). This modified behavior is the behavior exhibited in
reference implementation.

Bugfixes:

- Undo attribute special HTML attribute behavior (see previous
release).

This turned out not to be a compatible behavior; rather, boolean
values should simply be coerced to a string.

Meanwhile, the reference implementation does support an HTML mode in
which the special attribute behavior is exhibited.

We do not currently support this mode.

Page 14 of 19

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.