Skip to content

Commit a70c531

Browse files
committed
release 1.15
Signed-off-by: Florian Scherf <[email protected]>
1 parent 0edf7e1 commit a70c531

File tree

4 files changed

+114
-2
lines changed

4 files changed

+114
-2
lines changed

doc/content/api-reference/html.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,10 @@ given selector.
174174
Using HTML Strings
175175
~~~~~~~~~~~~~~~~~~
176176
177+
.. note::
178+
179+
Added in 1.15
180+
177181
To initialize an HTML tree you can use ``lona.html.parse_html``, which returns
178182
a Lona HTML node or a list of Lona HTML nodes.
179183
@@ -208,6 +212,11 @@ node instead of the list.
208212
Using lona.html.HTML
209213
++++++++++++++++++++
210214
215+
.. warning::
216+
217+
Using ``lona.html.HTML`` for HTML string parsing is deprecated as of
218+
1.15. Use ``lona.html.parse_html`` instead.
219+
211220
.. note::
212221
213222
Added in 1.5: Support for high level nodes, the keyword

doc/content/changelog.rst

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,109 @@ is_template: False
66
Changelog
77
=========
88

9+
10+
.. changelog-header:: 1.15 (2023-07-20)
11+
12+
Changes
13+
~~~~~~~
14+
15+
* Python
16+
17+
* Support for Python 3.7 was dropped
18+
19+
* Python 3.7 is `end of life <https://endoflife.date/python>`_ since
20+
June of 2023
21+
22+
* Client2
23+
24+
* A check for unsupported node types was added
25+
26+
* Previously, the rendering engine would just crash with an cryptic error
27+
message, when attempting to render an unsupported node type
28+
29+
* HTML
30+
31+
* ``Node.nodes`` accepts node lists now
32+
33+
* Previously, the list of sub nodes of a node could only be reset with a
34+
list or a tuple. Code like ``div2.nodes = div1.nodes`` created a
35+
``TypeError``.
36+
37+
* ``Node.widget_data`` now can be initialized via the constructor or by
38+
setting ``WIDGET_DATA`` in the class scope
39+
40+
* ``lona.html.parse_html`` was added
41+
42+
* Previously, ``lona.html.HTML`` was used to parse HTML strings. Because
43+
``lona.html.HTML`` works like a normal node and is mainly used to
44+
communicate that a function returns HTML, the community decided that
45+
these two concerns should be split up.
46+
47+
``lona.html.HTML`` is no deprecated for HTML string parsing, and this
48+
feature will be removed from it in version 2.
49+
50+
* Logging
51+
52+
* Obsolete information when logging ``lona.errors.ClientError`` exceptions
53+
were removed
54+
55+
* Previously, a raised ``lona.errors.ClientError`` was logged two times.
56+
Once by the worker, that received the error, and a second time by the
57+
general logging setup of Lona. The first log entry contained the
58+
JavaScript traceback, raised by the browser, the second log entry
59+
contained the full Python traceback from the server side.
60+
61+
The second log entry did not contain any meaningful information, since
62+
the Python traceback only contained Lona framework code, never
63+
application code.
64+
65+
The second log entry was removed, because it made these errors only
66+
harder to read.
67+
68+
69+
Bugfixes
70+
~~~~~~~~
71+
72+
* collect-static
73+
74+
* Handling of deeply nested directories was fixed
75+
76+
* Previously, the ``collect-static`` command crashed when a static directory
77+
was deeply nested but contained only one file
78+
79+
* HTML
80+
81+
* Node comparisons between nodes and legacy widgets was fixed
82+
83+
* Previously, node comparisons, using ``==``, crashed when one of the two
84+
nodes was a legacy widget
85+
86+
* Client2
87+
88+
* Moving an already rendered node was fixed
89+
90+
* Previously, client2 crashed when an already rendered node was moved by
91+
appending or inserting it twice within the same HTML tree.
92+
93+
.. code-block:: python
94+
95+
moving_node = Div('node 3')
96+
97+
html = HTML(
98+
Div(
99+
'node 1',
100+
moving_node,
101+
),
102+
Div('node 2'),
103+
)
104+
105+
self.show(html)
106+
107+
html[1].append(moving_node)
108+
109+
self.show(html) # resulted in: ERROR lona.view_runtime client error raised: node with id 952 is already cached
110+
111+
9112
.. changelog-header:: 1.14 (2023-05-22)
10113

11114
Changes

lona/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
from .view import View
1111
from .app import App
1212

13-
VERSION = (1, 14)
13+
VERSION = (1, 15)
1414
VERSION_STRING = '.'.join(str(i) for i in VERSION)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55

66
[project]
7-
version = "1.14"
7+
version = "1.15"
88
name = "lona"
99
description = "Write responsive web apps in full python"
1010

0 commit comments

Comments
 (0)