Skip to content

Commit 93688b2

Browse files
committed
release 1.14
Signed-off-by: Florian Scherf <[email protected]>
1 parent 6c52b54 commit 93688b2

File tree

7 files changed

+116
-4
lines changed

7 files changed

+116
-4
lines changed

doc/content/api-reference/channels.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
Channels
44
========
55

6+
.. note::
7+
8+
Added in 1.14
9+
610
Lona channels facilitate soft real-time communication between different
711
components of the server side of your application by implementing a
812
straightforward publish/subscribe system. They provide a means to exchange

doc/content/api-reference/server.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ Server.reverse()
7676
Server.fire_view_event()
7777
~~~~~~~~~~~~~~~~~~~~~~~~
7878

79+
.. note::
80+
81+
Deprecated since 1.14. Use Channels instead
82+
7983
.. note::
8084

8185
Added in 1.7.3

doc/content/api-reference/views.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,9 @@ browser URL.
627627
return input_event
628628
629629
def on_view_event(self, view_event):
630+
# deprecated since 1.14
631+
# use Channels instead
632+
630633
pass
631634
632635
def on_stop(self, reason):
@@ -673,6 +676,10 @@ This hook is gets called for every input event that is not awaited in
673676
LonaView.on_view_event\(view_event\)
674677
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
675678

679+
.. note::
680+
681+
View events are deprecated since 1.14. Use Channels instead.
682+
676683
This hook gets called for every incoming `view event <#view-events>`_.
677684

678685

@@ -1431,6 +1438,10 @@ LonaView.iter_objects\(\)
14311438
LonaView.fire_view_event\(name, data=None\)
14321439
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14331440

1441+
.. note::
1442+
1443+
View events are deprecated since 1.14. Use Channels instead.
1444+
14341445
.. note::
14351446

14361447
Added in 1.7.3

doc/content/changelog.rst

Lines changed: 94 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,99 @@ is_template: False
66
Changelog
77
=========
88

9+
.. changelog-header:: 1.14 (2023-05-22)
10+
11+
Changes
12+
~~~~~~~
13+
14+
* Templates
15+
16+
* Support for favicons was added to the default frontend template
17+
``lona/frontend.html``
18+
19+
* HTML
20+
21+
* Performance of ``Node.append()`` was improved
22+
23+
* Previously, ``Node.append()`` used ``NodeList.index()`` internally,
24+
which called ``Node._serialize()`` which is an expensive operation.
25+
26+
``Node.append()`` now calculates the index of the appended node itself,
27+
which is much faster.
28+
29+
* Performance of ``Node.__eq__()`` was improved
30+
31+
* Previously, ``Node.__eq__()`` used ``Node._serialize()`` which is an
32+
expensive operation. Now ``Node.__eq__()`` checks all attributes of two
33+
nodes individually, trying to find a difference as soon as possible.
34+
35+
* ``Node.tag_name`` and ``Node.widget`` are read-only now
36+
37+
* Re-writing of these properties was never supported, so it should not be
38+
possible to write them, to prevent confusion.
39+
40+
* State
41+
42+
* ``State.to_json()`` was added
43+
44+
* Sessions
45+
46+
* ``SESSIONS_REUSE`` setting was added
47+
48+
* When set to ``False`` the session middleware will create a random session
49+
key for every new connection. This is useful for debugging multi-user
50+
views.
51+
52+
* Client 1&2
53+
54+
* Support for reconnecting without creating a window was added
55+
56+
* Previously, when implementing auto-reconnect, the client would reopen the
57+
websocket connection, and in the case of success reload the tab. This
58+
reload is crucial to ensure a connect and a reconnect result in the same
59+
user experience, but has the side effect of accessing the same view
60+
twice. This created problems when debugging or reading the server logs.
61+
62+
To account for that, the option ``create_window`` was added to
63+
``LonaContext.reconnect()``, which is set to ``true`` by default.
64+
65+
* Channels
66+
67+
* Channels were added
68+
69+
* Channels are the successor to View Events, and are the new mechanism for
70+
soft real-time communication and multi-user features.
71+
72+
* Views
73+
74+
* View Events are deprecated now in favor of Channels
75+
76+
77+
Bugfixes
78+
~~~~~~~~
79+
80+
* Client 1&2
81+
82+
* Index of inserted nodes was fixed
83+
84+
* Previously, the rendering engine used ``Element.children`` to insert
85+
newly rendered nodes. This only works correctly when the target node only
86+
contains elements and no text nodes, because ``Element.children`` only
87+
contains references to child elements, in contrast to
88+
``Element.childNodes`` which contains child elements and child text
89+
nodes. The usage of only this subset of nodes lead to incorrect indices,
90+
and nodes ending up in wrong order, in some cases.
91+
92+
* Client 2
93+
94+
* Crashes while rendering node list slices were fixed
95+
96+
* Previously, the rendering engine could crash when a slice of
97+
``Node.nodes`` was re-rendered. This was due incorrect node cache
98+
cleaning on the client, and was fixed by cleaning the cache after every
99+
node-reset-operation.
100+
101+
9102
.. changelog-header:: 1.13 (2023-04-01)
10103

11104
Changes
@@ -1568,4 +1661,4 @@ Bugfixes
15681661

15691662
.. changelog-header:: 1.0 (2021-08-09)
15701663

1571-
Initial stable release
1664+
Initial stable release

doc/content/demos/daemonized-view/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ Source code
3434
-----------
3535

3636
.. code-block:: python
37-
:include: daemonized-view.py
37+
:include: daemonized-view.py

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, 13)
13+
VERSION = (1, 14)
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.13"
7+
version = "1.14"
88
name = "lona"
99
description = "Write responsive web apps in full python"
1010

0 commit comments

Comments
 (0)