Commit Graph

21 Commits

Author SHA1 Message Date
Fabio Manganiello 59c693d6a0
[#394] All `manifest.yaml` converted to `manifest.json`.
YAML isn't part of the Python standard library, while JSON is.

If we want `setup.py` to dynamically parse the available integration
manifest files in order to populate the extra dependencies, then it's
better to rely on a JSON format for manifest files - the parser is part
of the standard library and it doesn't require the user to install
`pyyaml` before `platypush`.
2024-05-17 02:21:57 +02:00
Fabio Manganiello b4d0716bc5
Added layer of compatibility with both paho.mqtt >= 2.0.0 and < 2.0.0.
See 28aa2e6b26/ChangeLog.txt (L6)
2024-04-08 23:01:54 +02:00
revil-O 584f226b62 mqtt CallbackAPIVersion fix for paho.mqtt >= 2.0.0
fix to work with paho.mqtt >= 2.0.0
2024-04-08 16:05:27 +02:00
Fabio Manganiello 0a3ec4b9f1
Merge branch 'master' into 311/auto-generate-deps-docs 2023-09-28 01:25:29 +02:00
Fabio Manganiello b76f141b61
Catch response write errors in the MQTT callback.
continuous-integration/drone/push Build is passing Details
If the client that forwarded the request is no longer available (either
because an exception or a timeout was raised) then its I/O buffer and
event loop may be closed.

In this case, the response callback should handle and report the
exception, and still set the event, so that any other threads waiting
for the response can move on.
2023-09-27 11:23:55 +02:00
Fabio Manganiello c311987741
Removed `typing.Final` from some of the most commonly used modules.
continuous-integration/drone/push Build is passing Details
`typing.Final` is not defined on Python < 3.8.
2023-09-26 23:50:10 +02:00
Fabio Manganiello c3337ccc6c
[#311] Docs deps autogen sphinx plugin.
continuous-integration/drone/push Build is passing Details
Added an `add_dependencies` plugin to the Sphinx build process that
parses the manifest files of the scanned backends and plugins and
automatically generates the documentation for the required dependencies
and triggered events.

This means that those dependencies are no longer required to be listed
in the docstring of the class itself.

Also in this commit:

- Black/LINT for some integrations that hadn't been touched in a long
  time.

- Deleted some leftovers from previous refactors (deprecated
  `backend.mqtt`, `backend.zwave.mqtt`, `backend.http.request.rss`).

- Deleted deprecated `inotify` backend - replaced by `file.monitor` (see
  #289).
2023-09-24 17:00:08 +02:00
Fabio Manganiello 761f2768cb
[#316] Added RPM dependencies.
continuous-integration/drone/push Build is passing Details
2023-09-21 23:20:06 +02:00
Fabio Manganiello 3e8d6bb01e Removed `typing-extensions` dependency.
continuous-integration/drone/push Build is failing Details
The package isn't present on older versions of Debian.
2023-09-18 14:05:39 +02:00
Fabio Manganiello 07c88c9530
Added logic to prevent socket leakage from paho-mqtt upon client stop.
continuous-integration/drone/push Build is passing Details
2023-09-17 23:43:56 +02:00
Fabio Manganiello 5a514fdcce
Only support the `run_topic` logic on the MQTT plugin.
Plugins that extend `MqttPlugin` shouldn't run messages as
requests, even if the parent MQTT plugin is configured to
do so.
2023-09-14 01:09:03 +02:00
Fabio Manganiello 4cb5aa7acb
Prepend the class name to the string used to generate the MQTT client_id hash.
If we include the class name by default then we won't have to
explicitly modify the client_id in the implementation classes
in order to prevent clashes.
2023-09-14 01:06:53 +02:00
Fabio Manganiello 33a1ef39e4
Refactored and merged `backend.mqtt` logic into `mqtt` plugin. 2023-09-06 02:43:45 +02:00
Fabio Manganiello 98e9abde18
Extended manifest files with Python system packages (if available).
continuous-integration/drone/push Build is passing Details
- If a Python optional dependency is available as a system package on
  the target system, try and install it that route rather than pip. It's
  usually faster and it decreases the risk of breaking system packages.

- Added support for apk dependencies in manifest files. This brings the
  number of distros officially supported by all the extensions to four:

  - Alpine
  - Arch
  - Debian
  - Ubuntu
2023-08-16 22:43:51 +02:00
Fabio Manganiello 1d0be5c929
- Simplified prototype for `EntityManager.set`
- Added small documentation/annotations notes to the `Plugin` module.

- Small LINT fixes
2023-02-11 21:35:00 +01:00
Fabio Manganiello be3b99326f
[WIP] Refactoring `@manages` annotation into a proper `EntityManager` hierarchy 2023-02-02 23:21:12 +01:00
Fabio Manganiello 72c7444a45
LINT 2022-10-23 18:23:20 +02:00
Fabio Manganiello b88983f055
Added `qos` argument to `mqtt.publish`. 2022-10-05 01:13:47 +02:00
Fabio Manganiello 6656bb4ce5
Revert "Support for SSL flag on MQTT plugins without having to specify other tls_* options"
This reverts commit f3be4a50d8.
2022-01-14 21:53:24 +01:00
Fabio Manganiello f3be4a50d8
Support for SSL flag on MQTT plugins without having to specify other tls_* options 2022-01-14 21:39:16 +01:00
Fabio Manganiello 3bfc5b83ef Moved to manifest files for describing plugins and backends and their dependencies 2021-09-16 17:53:40 +02:00