- Switched to dark mode (I couldn't find any decent light theme
combination that works with the Platypush UI).
- Support passing static `content` and `content-type` rather than only a
`file`.
- Pass the `with-save` property from `EditorModal` to `Editor`.
`ssl.wrap_socket()` has been removed in Python 3.12 - see
https://docs.python.org/3.12/whatsnew/3.12.html#ssl.
Instead, the integration should create its own `SSLContext` and use
the `wrap_socket()` from that object.
In Tornado there can apparently be some race condition where `open` on a
Websocket handler does a `self.close()`, but the client is still sending
some bytes.
In that case, it may happen that the extra message is still processed.
This commit prevents the race condition by raising an exception in
`open` upon authentication failure instead of doing `close()+return`.
The testing repo is only required by `py3-marshmallow`, which is not yet
included in the community repo, but it can end up breaking some builds
because of the incompatibility with the packages in the base repo.
It should suffice for the user to provide username+password when
creating a new API token, even if 2FA is enabled.
That's because user authentication has already occurred by the time that
that check is made, and the user is already logged through a valid
session or API token, so adding an 2FA code check isn't required.
This also ensures that the UI doesn't break with a 401 on
`/#settings?page=tokens&type=api` when creating a new token.
The only case where it's fine to overwrite existing Python packages with
pip versions is when Platypush is running in a virtual environment.
Otherwise, keep the system-installed version if it's available, unless
its version is explicitly incompatible with the one reported in
`requirements.txt`.