@@ -8,88 +8,13 @@ You can also install the master (head of tree) version from GitHub, either using
88Because pyscript has quite a few unit tests, generally the master version should work ok. But it's not
99guaranteed to work at any random time, and newly-added features might change.
1010
11- The latest release is 1.1 .0, released on December 10, 2020 . Here is the `stable documentation
11+ The latest release is 1.2 .0, released on January 31, 2021 . Here is the `stable documentation
1212<https://hacs-pyscript.readthedocs.io/en/stable> `__ for that release.
1313
1414Over time, the master (head of tree) version in GitHub will include new features and bug fixes.
1515Here is the `latest documentation <https://hacs-pyscript.readthedocs.io/en/latest >`__ if you want
1616to see the development version of the documentation.
1717
18- If you want to see development progress since 1.1 .0, see
18+ If you want to see development progress since 1.2 .0, see
1919`new features <https://hacs-pyscript.readthedocs.io/en/latest/new_features.html >`__
2020in the latest documentation.
21-
22- Planned new features post 1.1.0 include:
23-
24- - Consider supporting the built-in functions that do I/O, such as ``open ``, ``read `` and ``write ``, which
25- are not currently supported to avoid I/O in the main event loop, and also to avoid security issues if people
26- share pyscripts. The ``print `` function only logs a message, rather than implements the real ``print `` features,
27- such as specifying an output file handle. Support might be added in the future using an executor job, perhaps
28- enabled when ``allow_all_imports `` is set.
29-
30- The new features since 1.1.0 in master include:
31-
32- - Reload is automatically done whenever a script file, ``requirements.txt `` or ``yaml `` file below the
33- ``pyscript `` folder is modified, created, renamed or deleted, or a directory is renamed, created or
34- deleted; see #74.
35- - New functions ``task.create ``, ``task.current_task ``, ``task.cancel ``, ``task.name2id ``, ``task.wait ``,
36- ``task.add_done_callback ``, ``task.remove_done_callback `` allow new background (async) tasks to be
37- created, canceled, waited on, and completion callbacks to be added or deleted. Proposed by @dlashua
38- and @valsr; see #112, #130, #143, #144.
39- - Added support for ``now `` to ``@time_trigger `` time specifications, which means the current date and
40- time when the trigger was first evaluated (eg, at startup or when created as an inner function or closure),
41- and remains fixed for the lifetime of the trigger. This allows time triggers of the form ``once(now + 5min) ``
42- 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.
46- - New function decorator ``@pyscript.compile `` compiles a native Python function inside pyscript, which
47- is helpful if you need a regular function (all pyscript functions are coroutines) for callbacks or
48- other uses like ``map() ``, or if you have code you want to run at compiled speed (see #71). The
49- function body can't contain any pyscript-specific features, and closure of variables for an inner
50- function that uses ``@pyscript.compile `` won't work either, since in pyscript local variables with
51- scope binding are objects, not their native types. Note also that this is an experimental feature
52- and the decorator name or other features might change prior to release; feedback welcome.
53- Proposed by @dlashua; see #71.
54- - A new variable ``pyscript.app_config `` is available in the global address space of an app's main
55- file (ie, ``apps/YOUR_APP.py `` or ``apps/YOUR_APP/__init__.py ``) and is set to the YAML configuration
56- for your app (ie, ``pyscript.config["apps"][YOUR_APP] ``). The latter is still available, but is
57- deprecated and the ``apps `` entry in ``pyscript.config `` will be removed in a future release to
58- prevent wayward applications from seeing configuration settings for other apps.
59- - Updated ``croniter `` to 1.0.2.
60- - Updated docs to explain how secret parameter values can be stored and retrieved from yaml
61- configuration, by @exponentactivity; see #124.
62- - Report parsing errors on invalid ``@time_active `` arguments; by @dlashua; see #119.
63- - ``task.executor `` raises an exception when called with a pyscript function.
64-
65- Breaking changes since 1.1.0 include:
66-
67- None. However, the use of ``pyscript.config["apps"][YOUR_APP] `` to get application configuration
68- is still available but now deprecated. The ``apps `` entry in ``pyscript.config `` will be removed in
69- a future release. This is to prevent wayward applications from seeing configuration settings for other
70- apps. The new ``pyscript.app_config `` variable should be used instead - it is set to
71- ``pyscript.config["apps"][YOUR_APP] `` for each app.
72-
73- Bug fixes since 1.1.0 include:
74-
75- - Fixed shutdown trigger for case where it calls ``task.unique() ``; reported by @dlashua (#117).
76- - Duplicate ``@service `` function definitions (ie, with the same name) now correctly register
77- the service, reported by @wsw70; see #121.
78- - Added error message for invalid ``@time_active `` argument, by @dlashua; see #118.
79- - The ``scripts `` subdirectory is now recursively traversed for ``requirements.txt `` files.
80- - Inner functions and classes (defined inside a function) are added to global symbol table
81- if declared as global.
82- - Reload all scripts if global settings ``allow_all_imports `` or ``hass_is_global `` change; see #74.
83- - Methods bound to class instances use weakrefs so that ``__del__ `` works; reported by @dlashua; see #146.
84- - Inner functions and classes are added to global symbol table if declared as ``global ``.
85- - Pyscript user-defined functions (which are all async) can now be called from native python async
86- code; see #137.
87- - Internals that call ``open() `` now set ``encoding=utf-8 `` so Windows platforms use the correct
88- encoding; see #145.
89- - On Windows, python is missing ``locale.nl_langinfo ``, which caused startup to fail when the
90- locale-specific days of week were extracted. Now the days of week in time trigger expressions
91- are available on Windows, but only in English; see #145.
92- - ``task.name2id() `` raises ``NameError `` if task name is undefined. Also added ``kwargs `` to ``task.wait() ``.
93- - Added ``"scripts/**" to ``REQUIREMENTS_PATHS ``, so deeper directories are searched.
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