Commit graph

4350 commits

Author SHA1 Message Date
c9a5c29a4a
🐛 A proper cross-version solution for the utcnow() issue.
No need to maintain two different pieces of logic - a `utcnow()` for
Python < 3.11 and `now(datetime.UTC)` for Python >= 3.11.

`datetime.timezone.utc` existed long before datetime.UTC and that's what
the `utcnow` facade should use.

This means that all the `utcnow()` will always have `tzinfo=UTC`
regardless of the Python version.

There's still a problem with the `utcnow()`-generated timestamps that
have been generated by previous versions of Python and stored on the db.

Therefore, when the code performs comparisons with timestamps fetched
from the db, it should always explicitly do a `.replace(tzinfo=utc)` to
ensure that we always compare offset-aware datetime representations.

See blog post for technical details:
https://manganiello.blog/wheres-my-time-again
2024-06-01 01:34:47 +02:00
1067ab04d9
[tts.picovoice] Adapted to the new orca.synthesize API.
The new API no longer returns a list of numeric values alone. Instead,
it returns a tuple where the first element is the raw audio, and the
second element contains extra info on the rendered phonemes.
2024-05-31 21:10:48 +02:00
709b90fa4b
Merge branch 'master' into 384/assistant-openai 2024-05-31 21:07:06 +02:00
06f0ac4545
[Automatic] Updated components cache
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-31 17:59:06 +00:00
944fd45f9f
Bump version: 1.0.3 → 1.0.4
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-31 19:57:51 +02:00
6acdde6164
Updated CHANGELOG 2024-05-31 19:57:43 +02:00
3583dafbc3
🐛 Partial revert of c18768e61f
`datetime.utcnow` may be deprecated on Python >= 3.12, but
`datetime.UTC` isn't present on older Python versions.

Added a `platypush.utils.utcnow()` method as a workaround compatible
with both.
2024-05-31 19:55:19 +02:00
4513bb9569
Set a plugin argument on AssistantEvents besides assistant.
`assistant` contains the assistant plugin object that triggered the
event, but you can't create event hook conditions on attributes that are
plugins.

The event should also store a `plugin` attribute which contains the
unique plugin name, so hooks like these can be built:

```
from platypush import hook
from platypush.events.assistant import ConversationStartEvent

@when(ConversationStartEvent, plugin="assistant.google")
def on_google_conversation_start():
  ...
```

It wouldn't be possible to construct a hook condition like the one above
on the plugin object reported on the `assistant` attribute.
2024-05-31 19:55:19 +02:00
4e82dd17bb
🐛 Partial revert of c18768e61f
`datetime.utcnow` may be deprecated on Python >= 3.12, but
`datetime.UTC` isn't present on older Python versions.

Added a `platypush.utils.utcnow()` method as a workaround compatible
with both.
2024-05-31 19:52:32 +02:00
e982c02524
Set a plugin argument on AssistantEvents besides assistant.
`assistant` contains the assistant plugin object that triggered the
event, but you can't create event hook conditions on attributes that are
plugins.

The event should also store a `plugin` attribute which contains the
unique plugin name, so hooks like these can be built:

```
from platypush import hook
from platypush.events.assistant import ConversationStartEvent

@when(ConversationStartEvent, plugin="assistant.google")
def on_google_conversation_start():
  ...
```

It wouldn't be possible to construct a hook condition like the one above
on the plugin object reported on the `assistant` attribute.
2024-05-31 19:29:50 +02:00
d9a5ea1e53
Merge branch 'master' into 384/assistant-openai 2024-05-31 02:58:08 +02:00
23e02de1d7
Bump version: 1.0.2 → 1.0.3
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-31 02:57:08 +02:00
4d0b63a155
Updated CHANGELOG 2024-05-31 02:57:08 +02:00
ce1525e786
[Automatic] Updated components cache
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-31 00:53:37 +00:00
67478e7ca1 🐛 Fixed proper support for event package alias platypush.events.
Even though `platypush.events` is just a symlink to
`platypush.message.event`, imports from those two modules will be
treated as different imports, thus hook conditions build on
`platypush.events` imports will never match.
2024-05-31 00:52:48 +00:00
c18768e61f Replaced deprecated usages of datetime.utcnow() with datetime.now(UTC). 2024-05-31 00:52:48 +00:00
30362b89e3 [assistant] tts_plugin_args should include join=True by default.
The assistant by default should be configured to wait for response audio
to be fully rendered before proceeding.
2024-05-31 00:52:48 +00:00
826a3fa55c CHANGELOG update 2024-05-31 00:52:48 +00:00
3986549326
🐛 Fixed proper support for event package alias platypush.events.
All checks were successful
continuous-integration/drone/push Build is passing
Even though `platypush.events` is just a symlink to
`platypush.message.event`, imports from those two modules will be
treated as different imports, thus hook conditions build on
`platypush.events` imports will never match.
2024-05-31 02:50:00 +02:00
fa318882a5
Replaced deprecated usages of datetime.utcnow() with datetime.now(UTC). 2024-05-31 02:30:48 +02:00
d6185ddb1e
[assistant] tts_plugin_args should include join=True by default.
The assistant by default should be configured to wait for response audio
to be fully rendered before proceeding.
2024-05-30 01:33:56 +02:00
d2caa989ac
CHANGELOG update 2024-05-27 00:18:27 +02:00
fa3c804b71 [#368] Added Ubuntu release logic to update-apt-repo step too. 2024-05-26 20:57:10 +00:00
4cd0761e78
[#368] Added Ubuntu release logic to update-apt-repo step too.
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-26 22:56:23 +02:00
16f7b7e12a Merge pull request '[#368] Added Ubuntu packages' (#402) from 368/ubuntu-packages into master
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #402

Closes: #368
2024-05-26 22:41:44 +02:00
22222fab65
[#368] Added Ubuntu packages
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-26 22:38:22 +02:00
5b3c0ad1cf
Bump version: 1.0.1 → 1.0.2
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-26 11:09:51 +02:00
3758a8d759
Updated CHANGELOG 2024-05-26 11:09:42 +02:00
de2bbc53c6
Support both @procedure and @procedure(name) notations.
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-26 11:02:19 +02:00
a4a776986b
Bump version: 1.0.0 → 1.0.1
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-26 04:27:27 +02:00
9fef73a746
Bumped version in setup.py (for some reason bumpversion missed it) 2024-05-26 04:27:03 +02:00
0f6f119089
Bump version: 0.99.11 → 1.0.0
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-26 04:15:52 +02:00
c64ff40dd3
Bump version: 0.99.10 → 0.99.11
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-26 04:06:15 +02:00
5c0f85c311
Don't provide git+https:// dependencies in setup.py extras.
Otherwise Twine will complain with errors like this:

```
HTTPError: 400 Bad Request from https://upload.pypi.org/legacy/
Can't have direct dependency: pybluez@
git+https://github.com/pybluez/pybluez ; extra == "bluetooth". See
https://packaging.python.org/specifications/core-metadata for more
information.
```
2024-05-26 04:04:58 +02:00
e6702398dc
Bump version: 0.99.9 → 0.99.10
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-26 03:46:51 +02:00
983bcc240a
[Docs] A more robust interceptor for the grid rendering. 2024-05-26 03:46:25 +02:00
d6d9d7a8e7
[CI/CD] Added extra dependencies to update-pip-package step. 2024-05-26 03:40:10 +02:00
8d26721040
Bump version: 0.99.8 → 0.99.9
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-26 03:32:49 +02:00
96f265a4a2
[CI/CD] Use a base Alpine image instead of python:3.11-alpine.
Weird errors seem to happen on Twine on that image:

```
Traceback (most recent call last):
  File "/usr/bin/twine", line 5, in <module>
    from twine.__main__ import main
  File "/usr/lib/python3.11/site-packages/twine/__init__.py", line 32, in <module>
    import importlib.metadata
  File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 17, in <module>
    from . import _adapters, _meta
  File "/usr/lib/python3.11/importlib/metadata/_adapters.py", line 3, in <module>
    import email.message
  File "/usr/lib/python3.11/email/message.py", line 15, in <module>
    from email import utils
  File "/usr/lib/python3.11/email/utils.py", line 28, in <module>
    import random
  File "/usr/lib/python3.11/random.py", line 49, in <module>
    from math import log as _log, exp as _exp, pi as _pi, e as _e, ceil as _ceil
ImportError: Error relocating /usr/lib/python3.11/lib-dynload/math.cpython-311-x86_64-linux-musl.so: _PyModule_Add: symbol not found
```
2024-05-26 03:31:25 +02:00
0ffff854d3
Bump version: 0.99.7 → 0.99.8
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-26 03:18:16 +02:00
020804fd1c
Don't link wiki/Home.md to wiki/index.md 2024-05-26 03:16:32 +02:00
42174b31bc
Bump version: 0.99.6 → 0.99.7
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-26 03:12:26 +02:00
3642d1ffa4
Added dns to mocked modules. 2024-05-26 03:02:57 +02:00
104457a302
Bump version: 0.99.5 → 0.99.6
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-26 01:47:22 +02:00
0445087699
[CI/CD] Removed hanging dependency. 2024-05-26 01:47:05 +02:00
751d719b04
Bump version: 0.99.4 → 0.99.5
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2024-05-26 01:46:29 +02:00
bef027fc07
[CI/CD] Just remove the sync-stable-branch step. 2024-05-26 01:46:04 +02:00
cc670f9d4a
Bump version: 0.99.3 → 0.99.4
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-26 01:26:46 +02:00
86674ddc28
[CI/CD] Do a git fetch beofre checkout/rebase in sync-stable-branch. 2024-05-26 01:26:19 +02:00
ee3933dc77
Bump version: 0.99.2 → 0.99.3
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-26 00:56:29 +02:00