Chameleon

Latest version: v4.5.4

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

Scan your dependencies

Page 6 of 19

3.5

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

- Add support for Python 3.8.

- Add support for TAL attributes in an XML declaration tag. This fixes
issue 269.

- Add support for custom exception handling for the `tal:on-error`
statement. There is now an option `on_error_handler` available
as a template configuration (issue 266).

- Fix issue where double '$$' escaping would affect non-interpolation
expressions such as the bare '$$' (issue 265).

- Fix an issue where backslash dollar escaping would leave the
backslash character still in place.

3.4

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

Bugfixes:

- Fix regression with translations in case of multiple nodes.

3.3

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

Bugfixes:

- Reset error token when rendering internal macro calls.

- Fix edge case in exception handler causing recursion.
[MatthewWilkes]

3.2

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

Features:

- Add the automatic variable ``macroname`` that's bound to the name of
the executing macro. Fixes https://github.com/malthe/chameleon/issues/238

- A tokenizer can now be configured on the template class. This is
useful in the case where the template file input is modified before
parsing (for example, where some tags are stripped away) such that
token positions need to be offset accordingly for error locations to
be rendered correctly.

- Expression errors now display source marker (previously only
filename, line and column was shown).

- No longer require Python source files to import modules.
[mrh1997]

Optimizations:

- Exception tracking now defers metadata allocation to time of error.

3.1

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

Features:

- Add option ``restricted_namespace`` which controls whether to
restrict namespaces to those defined and used by the page template
language.
[hansroh]

Bugs:

- Fixed attribute HTML entity escaping issue where an entity such as
``&`` would be encoded twice.

Optimizations:

- Simplify exception tracking, reducing bytecode size significantly.

- Avoid checking if a static string is ``None`` during expression
interpolation.

3.0

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

Bugs:

- Fix issue on Python 2 where an exception was not cleared when using
the pipe operator and was thus accessible through `sys.exc_info()`.

- The "exists" expression no longer leaks error information.

- Escape '$$' into '$' in both content and string expressions.

- Fix use of macro definition inside translation block.

Improvements:

- Allow unquoted attribute values.

- Wrap attribute error thrown when trying to use a non-macro as a
macro as a `RenderError` to get proper error output.

- Throw a parse error if '--' (double hyphen) appears in an XML
comment.

- The `i18n:target` attribute now overrides a default
`target_language` variable and is passed to the translation
function.

- Include filename in the on-disk cache module name. Previously,
only the SHA digest in hex representation would be used, making
it difficult to see where the module came from. This fixes issue
132.

- Add support for non-ascii attribute names.
[sank]

Compatibility:

- Drop support for Python 2.6, 3.1, and 3.2.

Page 6 of 19

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.