Etgen

Latest version: v1.1.4

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

Scan your dependencies

Page 1 of 2

1.1.2

2021-12-16
==========

Fix `4401 <https://jane.mylino.net/#/api/tickets/Tickets/4401>`__ (cannot import name 'escape' from 'cgi')

2021-09-02
==========

Move :func:`validate_pain001` and its XSD files to :mod:`lino_xl.lib.finan`.

1.1.1

2020-05-04
==========

1.1.0

2020-05-01
==========

Fixed two warnings "ResourceWarning: unclosed file <_io.TextIOWrapper
name='.../tests/finan.PaymentOrder-63.xml' mode='r' encoding='UTF-8'>"
caused by :mod:`etgen.sepa.validate`.

New rule for :func:`etgen.html.to_rst` : when the value is a string, we now
assume that it is raw HTML, which means that we parse it and then process is
like normal element tree elements.


2019-10-14
==========

html2rst now digests ``html`` and ``body`` elemtns and provides clearer
error messages for unsupported elements

1.0.0

0.0.4

====================================

- use the ElementTree builder (``E``) from :mod:`lxml` instead of my
own implementation based on :mod:`xml.etree.ElementTree`. Though not
the easy way. It has a few consequences (see below).

We cannot use `E.tostring()` any more because the ``E`` defined in
:mod:`lxml.etree` doesn't have that method. My extended version of
:func:`tostring` is now as a global function in :mod:`etgen.html`.

Old code::

from etgen.html import E
...
E.tostring()

New code::

from etgen.html import E, tostring
...
tostring()

Same problem for `E.iselement` and `E.to_rst` and `E.raw`.

In lxml we don't have the hack of adding an underscore to attributes
like `class` which are a reserved in Python. We must convert these
cases. Before::

return E.li(a, class_="active")

After::

return E.li(a, **{'class': "active"})

Failures saying `TypeError: bad argument type: __proxy__(u' by ')` are
because lxml elements don't like Django translatable strings. Old
code::

return E.div(E.h2(self.actor.label), e)

New code::

return E.div(E.h2(str(self.actor.label)), e)

Another failure was in code which updates existing elements
:message:`TypeError: update() takes no keyword arguments`. Old code::

e.attrib.update(align='right')

New code::

e.set('align', 'right')

0.0.3

====================================

- Added a test case for :mod:`etgen.sepa.validate`.

- Added dependency to atelier (fix for
https://travis-ci.org/lino-framework/etgen/jobs/342304371)

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.