Skip to content

Commit

Permalink
release 1.7.4
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Scherf <f.scherf@pengutronix.de>
  • Loading branch information
fscherf committed Oct 13, 2021
1 parent 76dfe38 commit d93460a
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 2 deletions.
47 changes: 47 additions & 0 deletions doc/content/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,53 @@ search_index_weight: -10
Changelog
=========

.. changelog-header:: 1.7.4 (2021-10-13)


Changes
~~~~~~~

* Deprecations

* ``LonaView.iter_objects()`` is now deprecated and will be removed in 1.8

* This method is replaced by the view events API

* ``LonaView.on_shutdown()`` is now deprecated and will be removed in 1.8

* This hook has many flaws and special rules when it runs and when not.
It is replaced by ``LonaView.on_stop()`` and ``LonaView.on_cleanup()``

* Support for Python3.10 was added

* Views

* ``LonaView.on_stop()`` was added
* ``LonaView.on_cleanup()`` was added
* Redirect support was added to ``LonaView.handle_input_event()``
* Redirect support was added to ``LonaView.handle_input_event_root()``
* Redirect support was added to ``LonaView.on_view_event()``

* Client

* Ping messages were added

* Modern browsers like Chrome close websockets after a preconfigured
timeout of around five minutes of inactivity to save energy. This can
lead to all sorts of bad user experience, because all important state is
part of the view in Lona.


Bugfixes
~~~~~~~~

* html

* Handling of generators was fixed

* Previously lines like ``Div(Div() for in range(10))`` did not work


.. changelog-header:: 1.7.3 (2021-10-08)


Expand Down
4 changes: 4 additions & 0 deletions doc/content/end-user-documentation/settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ Client
:name: CLIENT_PING_INTERVAL
:path: lona.default_settings.CLIENT_PING_INTERVAL

.. note::

Added in 1.7.4

To disable ping messages set to ``0``.

Sessions
Expand Down
18 changes: 17 additions & 1 deletion doc/content/end-user-documentation/views.rst
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,11 @@ JSON Responses
View Hooks
----------

.. note::

* ``LonaView.on_stop()`` was added in 1.7.4
* ``LonaView.on_cleanup()`` was added in 1.7.4

All entry points for user code in Lona views are callbacks in the ``LonaView``
class. If a hook name starts with ``handle_`` it means that the view can stop
the event handler chain for the incoming event. If a hook name starts with
Expand Down Expand Up @@ -427,6 +432,10 @@ This hook gets called for every incoming `view event <#view-events>`_.
LonaView.on_stop\(reason\)
~~~~~~~~~~~~~~~~~~~~~~~~~~

.. note::

Added in 1.7.4

This hook gets called after ``handle_request()`` stops. ``reason`` is either
``None`` if ``handle_request()`` finished normally, or an exception if
``handle_request()`` was interrupted or crashed. If it crashed, ``reason``
Expand All @@ -443,6 +452,10 @@ a ``lona.exceptions.UserAbort`` exception.
LonaView.on_cleanup\(\)
~~~~~~~~~~~~~~~~~~~~~~~

.. note::

Added in 1.7.4

This hook gets called after the view is fully shutdown and gets removed from
the server.

Expand Down Expand Up @@ -510,6 +523,8 @@ Input Events
as node B. To check if node A is node B is ``is`` instead of ``==`` was
required.

**Added in 1.7.4:** Redirects

Input events get handled in a chain of hooks. Every hook is required to return
the given input event, to pass it down the chain, or return ``None`` to mark
the event as handled.
Expand Down Expand Up @@ -833,7 +848,8 @@ View Events

.. note::

Added in 1.7.3
* Added in 1.7.3
* Redirect support was added in 1.7.4

Views can communicate with each other by sending events using
``LonaView.fire_view_event()``. A view event consists of a name and data.
Expand Down
2 changes: 1 addition & 1 deletion lona/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@

pass

VERSION = (1, 7, 3)
VERSION = (1, 7, 4)
VERSION_STRING = '.'.join(str(i) for i in VERSION)

0 comments on commit d93460a

Please sign in to comment.