Skip to content

Commit eb4dde9

Browse files
committed
changes for 1.0.0 release
1 parent 72aff76 commit eb4dde9

File tree

3 files changed

+12
-59
lines changed

3 files changed

+12
-59
lines changed

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
author = 'Craig Barratt'
2424

2525
# The full version, including alpha/beta/rc tags
26-
release = '0.32'
26+
release = '1.0.0'
2727

2828
master_doc = 'index'
2929

docs/new_features.rst

Lines changed: 8 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -8,66 +8,19 @@ You can also install the master (head of tree) version from GitHub, either using
88
Because pyscript has quite a few unit tests, generally master should work ok. But it's not guaranteed
99
to work at any random time.
1010

11-
The latest release is 0.32, released on October 21, 2020. Here is the `stable documentation <https://hacs-pyscript.readthedocs.io/en/stable>`__
11+
The latest release is 1.0.0, released on November 9, 2020. Here is the `stable documentation <https://hacs-pyscript.readthedocs.io/en/stable>`__
1212
for that release.
1313

1414
Since that release, the master (head of tree) version in GitHub has several new features and bug fixes.
1515
Here is the master `latest documentation <https://hacs-pyscript.readthedocs.io/en/latest>`__.
1616

17-
The new features since 0.32 in master include:
17+
Planned new features post 1.0.0 include:
1818

19-
- Pyscript state variables (entity_ids) can be persisted across pyscript reloads and HASS restarts,
20-
from @swazrgb and @dlashua (#48).
21-
- Entities ``domain.entity`` now support a virtual method ``service`` (eg, ``domain.entity.service()``)
22-
that calls the service ``domain.service`` for any service that has an ``entity_id`` parameter, with
23-
that ``entity_id`` set to ``domain.entity``. Proposed by @dlashua (#64).
24-
- ``@state_trigger`` now supports triggering on an attribute change with ``"domain.entity.attr"`` and
25-
any attribute change with ``"domain.entity.*"``, from @dlashua (#82)
26-
- State variables now support virtual attributes ``last_changed`` and ``last_updated`` for the UTC time when state
27-
values or any attribute was last changed.
28-
- State variable attributes can be set by direct assignment, eg: ``DOMAIN.name.attr = value``.
29-
An equivalent new function ``state.setattr()`` allows a specific attribute to be set.
30-
- State variable values (eg, from ``domain.entity`` or ``state.get()``) now include attributes that can be accessed
31-
after they are assigned to another, normal, variable.
32-
- ``@state_trigger`` and ``task.wait_until`` now have an optional ``state_hold`` duration in seconds that requires
33-
the state trigger to remain true for that period of time. The trigger occurs after that time elapses. If the state
34-
trigger changes to false before the time expires, the process of waiting for a new trigger starts over.
35-
- ``@time_active`` now has an optional ``hold_off`` duration in seconds, which ignores a new trigger if the last
36-
one happened within that time. Can be used for rate limiting or debouncing. Also, ``@time_active`` can now take
37-
zero time range arguments, in case you want to just specify ``hold_off``.
38-
- The ``hass`` object is available in all pyscript global contexts if the ``hass_is_global`` configuration parameter
39-
is true (default false). This allows access to HASS internals that might not be otherwise exposed by pyscript.
40-
Use with caution (#51).
41-
- Improvements to UI config flow, including allowing parameters to be updated, and the UI reload now works the same
42-
as the ``pyscript.reload`` service call, from @raman325 (#53)
43-
- Added inbound ``context`` variable to trigger functions and support optional ``context`` setting on state,
44-
event firing and service calls. Proposal and PR from @dlashua (#50, #60).
45-
- Logbook now supported using ``context`` and informational message based on trigger type. Proposal and PR
46-
from @dlashua (#50, #62).
47-
- Required Python packages can be specified in ``requirements.txt`` files at the top-level pyscript
48-
directory, and each module's or app's directory. Those files are read and any missing packages are
49-
installed on HASS startup and pyscript reload. If a specific version of a package is needed, it must be
50-
pinned using the format 'package_name==version'. Contributed by @raman325 (#66, #68, #69, #70, #78).
51-
- The reload service now takes an optional parameter ``global_ctx`` that specifies just that
52-
global context is reloaded, eg: ``global_ctx="file.my_scripts"``. Proposed by @dlashua (#63).
53-
- The ``state.get_attr()`` function has been renamed ``state.getattr()``. The old function is
54-
still available and will be removed in some future release (it logs a warning when used).
55-
- VSCode connections to pyscript's Jupyter kernel now work. Two changes were required: VSCode immediately
56-
closes the heartbeat port, which no longer causes pyscript to shut down the kernel. Also, ``stdout``
57-
messages are flushed prior to sending the execute complete message. This is to ensure `log` and `print`
58-
messages get displayed in VSCode. One benign but unresolved bug with VSCode is that when you connect
59-
to the pyscript kernel, VSCode starts a second pyscript Jupyter kernel, before shutting that second one
60-
down.
61-
- Service calls now accept ``blocking`` and ``limit`` parameters. The default behavior for a service call is
62-
to run it in the background, but using ``blocking=True`` will force a task to wait up to ``limit`` seconds
63-
for the service call to finish executing before continuing. Contributed by @raman325 (#85).
19+
- ``del`` can delete state variables and state variable attributes
20+
- use ``aionofity`` to auto-reload newly written script files, at least on linux (#74)
21+
- consider allowing native Python functions inside pyscript (#71)
22+
- consider implementing function decorators (#43)
6423

65-
The bug fixes since 0.32 in master include:
24+
The new features since 1.0.0 in master include:
6625

67-
- The ``@state_trigger`` expression is only evaluated when at least one of specific state variable
68-
or attribute values mentioned in the expression have changed; fixed by @dlashua (#82).
69-
- Jupyter autocomplete now works on multiline code blocks.
70-
- Improved error message reporting for syntax errors inside f-strings.
71-
- Fixed incorrect global context update on calling module that, in turn, does a callback (#58).
72-
- ``task.wait_until`` no longer silently ignores unrecognized keyword arguments (#80).
73-
- ``task.wait_until`` incorrectly ignored the keyword optional state_check_now argument (#81).
26+
- None so far

docs/reference.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -694,9 +694,9 @@ which you can’t do if you are directly assigning to the variable:
694694
``AttributeError`` exception is thrown if that attribute doesn't exist.
695695
``state.getattr(name)``
696696
Returns a ``dict`` of attribute values for the state variable ``name`` string, or ``None`` if it
697-
doesn’t exist. Alternatively, ``name`` can be a state variable. In pyscript versions 0.32 and
698-
earlier, this function was ``state.get_attr()``. That deprecated name is still supported, but
699-
logs a warning message and will be removed in a future version.
697+
doesn’t exist. Alternatively, ``name`` can be a state variable. In pyscript prior to 1.0.0,
698+
this function was ``state.get_attr()``. That deprecated name is still supported, but it logs a
699+
warning message and will be removed in a future version.
700700
``state.names(domain=None)``
701701
Returns a list of all state variable names (ie, ``entity_id``\ s) of a
702702
domain. If ``domain`` is not specified, it returns all HASS state variable (``entity_id``) names.

0 commit comments

Comments
 (0)