@@ -31,9 +31,7 @@ The new features since 1.1.0 in master include:
3131
3232- Reload is automatically done whenever a script file, ``requirements.txt `` or ``yaml `` file below the
3333 ``pyscript `` folder is modified, created, renamed or deleted, or a directory is renamed, created or
34- deleted (see #74).
35- - Function decorators are now supported. However, the existing trigger decorators are still hardcoded
36- (ie, not available as function calls), and decorators on classes are not yet supported. (See #43.)
34+ deleted; see #74.
3735- New functions ``task.create ``, ``task.current_task ``, ``task.cancel ``, ``task.name2id ``, ``task.wait ``,
3836 ``task.add_done_callback ``, ``task.remove_done_callback `` allow new background (async) tasks to be
3937 created, canceled, waited on, and completion callbacks to be added or deleted. Proposed by @dlashua
@@ -42,23 +40,26 @@ The new features since 1.1.0 in master include:
4240 time when the trigger was first evaluated (eg, at startup or when created as an inner function or closure),
4341 and remains fixed for the lifetime of the trigger. This allows time triggers of the form ``once(now + 5min) ``
4442 or ``period(now, 1hr) ``.
43+ - Function decorators are now supported. However, the existing trigger decorators are still hardcoded
44+ (ie, not available as function calls), and decorators on classes are not yet supported. First
45+ implementation by @dlashua; see #43.
4546- New function decorator ``@pyscript.compile `` compiles a native Python function inside pyscript, which
4647 is helpful if you need a regular function (all pyscript functions are coroutines) for callbacks or
4748 other uses like ``map() ``, or if you have code you want to run at compiled speed (see #71). The
4849 function body can't contain any pyscript-specific features, and closure of variables for an inner
4950 function that uses ``@pyscript.compile `` won't work either, since in pyscript local variables with
5051 scope binding are objects, not their native types. Note also that this is an experimental feature
5152 and the decorator name or other features might change prior to release; feedback welcome.
52- Proposed by @dlashua ( #71) .
53+ Proposed by @dlashua; see #71.
5354- A new variable ``pyscript.app_config `` is available in the global address space of an app's main
5455 file (ie, ``apps/YOUR_APP.py `` or ``apps/YOUR_APP/__init__.py ``) and is set to the YAML configuration
5556 for your app (ie, ``pyscript.config["apps"][YOUR_APP] ``). The latter is still available, but is
5657 deprecated and the ``apps `` entry in ``pyscript.config `` will be removed in a future release to
5758 prevent wayward applications from seeing configuration settings for other apps.
5859- Updated ``croniter `` to 1.0.2.
5960- Updated docs to explain how secret parameter values can be stored and retrieved from yaml
60- configuration (
61- - Report parsing errors on invalid ``@time_active `` arguments; by @dlashua ( #119) .
61+ configuration, by @exponentactivity; see #124.
62+ - Report parsing errors on invalid ``@time_active `` arguments; by @dlashua; see #119.
6263- ``task.executor `` raises an exception when called with a pyscript function.
6364
6465Breaking changes since 1.1.0 include:
@@ -73,22 +74,22 @@ Bug fixes since 1.1.0 include:
7374
7475- Fixed shutdown trigger for case where it calls ``task.unique() ``; reported by @dlashua (#117).
7576- Duplicate ``@service `` function definitions (ie, with the same name) now correctly register
76- the service, reported by @wsw70 ( #121)
77- - Added error message for invalid ``@time_active `` argument, by @dlashua ( #118) .
77+ the service, reported by @wsw70; see #121.
78+ - Added error message for invalid ``@time_active `` argument, by @dlashua; see #118.
7879- The ``scripts `` subdirectory is now recursively traversed for ``requirements.txt `` files.
7980- Inner functions and classes (defined inside a function) are added to global symbol table
8081 if declared as global.
8182- Reload all scripts if global settings ``allow_all_imports `` or ``hass_is_global `` change; see #74.
82- - Methods bound to class instances use weakrefs so that ``__del__ `` works; reported by @dlashua ( #146) .
83+ - Methods bound to class instances use weakrefs so that ``__del__ `` works; reported by @dlashua; see #146.
8384- Inner functions and classes are added to global symbol table if declared as ``global ``.
8485- Pyscript user-defined functions (which are all async) can now be called from native python async
85- code ( see #137) .
86- - Calls to ``open() `` now set ``encoding=utf-8 `` so Windows platforms use the correct encoding
87- ( see #145) .
86+ code; see #137.
87+ - Calls to ``open() `` now set ``encoding=utf-8 `` so Windows platforms use the correct encoding;
88+ see #145.
8889- On Windows, python is missing ``locale.nl_langinfo ``, which caused startup to fail when the
8990 locale-specific days of week were extracted. Now the days of week in time trigger expressions
90- are available on Windows, but only in English ( see #145) .
91+ are available on Windows, but only in English; see #145.
9192- ``task.name2id() `` raises ``NameError `` if task name is undefined. Also added ``kwargs `` to ``task.wait() ``.
9293- Added ``"scripts/**" to ``REQUIREMENTS_PATHS ``, so deeper directories are searched.
93- - Fixed typos in task reaper code, @dlashua ( #116) .
94- - Fixed exception on invalid service call positional arguments, reported by @huonw ( #131) .
94+ - Fixed typos in task reaper code, by @dlashua; see #116.
95+ - Fixed exception on invalid service call positional arguments, reported by @huonw; see #131.
0 commit comments