Yasha

Latest version: v5.0

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

Scan your dependencies

Page 1 of 2

5.0

-----------

Major release (requires Jinja2>=2.11 and Python>=3.6), unreleased

- Dropped support for Python 2.7. From this version onward Python 3.6
or newer is required (preparing for the upcoming major release of Jinja2).
- Fixed compatibility issue with Jinja 2.11.x (gh-60). From this version
onward Yasha requires Jinja 2.11 or newer.
- Removed option `--keep-trailing-newline` in favor of keeping the trailing
newline by default. The old behavior can be achieved with a new option
`--remove-trailing-newline`.

4.4

-----------

Minor release (last with Python 2.7 support), 23 Aug 2020

- Fixed an exit code in case of undefined variable from 0 to 1.
- Fixed a bug that caused extension classes not to load.
- Quoted string variable with commas is not converted to list anymore (gh-57).
- Implemented workaround for Jinja 2.11 compatibility issue (gh-60).
- Added support for INI and CSV file parsing.
- Fixed a bug that caused Yasha to crash when loading file extensions
(regression likely caused by Click).

4.3

-----------

Minor release, released 1 May 2018

- Added new option `--mode [pedantic|debug]`. In pedantic mode Yasha
becomes extremely picky on templates, e.g. undefined variables will
raise an error. In debug mode undefined variables will print as is.
- [Jinja's default configurations](https://github.com/pallets/jinja/blob/master/jinja2/defaults.py)
can be set in file extensions. This allows changing the template
syntax to mimic LaTeX, for example.

4.2

-----------

Minor release, released 18 March 2018

- Added support for multiple variables files.

4.1

-----------

Minor release, released 29 Oct 2017

- Fixed a bug related to automatic variable file lookup. Variable
file like templates, e.g. templates with `.json` extension, were
erronously used as a variable file too.

4.0

-----------

Major release, released 8 Oct 2017

- Reverted the change introduced in version 3.0 to use uppercase `-E`
and `-V` option flags for extension and variable files. Fixes
the SCons builder, which was still using lowercase options.
- Changed the way how template variables given as part of the
command-line call are defined. From this version all unknown long
options which has a proper value are interpreted as a template
variable, e.g. `--foo=bar` or `--foo bar`. Note that `-v foo bar` is
not working anymore.
- Fixed an issue where the command-line call `yasha ../template.j2`
searched for template companion files till root folder.
- Python literals can be used as part of the command-line call,
e.g. `yasha --foo "['bar', 'baz']" template.j2`.
- Added `env` template filter to read system environment variable.
- Added `shell` template filter to run a shell command. and to connect
its standard output. Requires Python >= 3.5.
- Added `subprocess` template filter to spawn new processes, but unlike
shell a CompletedProcess instance is returned, or CalledProcessError
in case of error. Requires Python >= 3.5.
- Added parser for XML type of variable files. Uses xmltodict.
- Added command-line option `-c` to set template encoding. Default is UTF-8.
- JSON parser updated to use `safe_load` (security).
- Within extension file, custom variable file parsers are now defined
either as a function named as `parse_`+ `<file extension>`, or the
parse-function is given via `PARSERS` dictionary with the key indicating
the file extension.
- Within extension file, custom filters and tests can be also given
via `FILTERS` and `TESTS` dictionary. This allows using external
filters easily, e.g. from Ansible.
- Common extension file can be now set via `YASHA_EXTENSIONS` system
environment variable.
- Command-line option `--no-variables` changed to `--no-variable-file`.
- Command-line option `--no-extensions` changed to `--no-extension-file`.
- Removed the variable/extension file overwrite protection introduced
in version 3.1. Caused more confusion than protection.

Page 1 of 2

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.