platypush/platypush
Fabio Manganiello 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
..
app Added a nice ASCII-art logo at application startup. 2024-05-24 22:57:50 +02:00
backend 🐛 Partial revert of c18768e61f 2024-05-31 19:55:19 +02:00
builder Removed typing.Final from some of the most commonly used modules. 2023-09-26 23:50:10 +02:00
bus Removed typing.Final from some of the most commonly used modules. 2023-09-26 23:50:10 +02:00
commands [assistant.picovoice] Sync between the speech and intent engines. 2024-05-02 00:51:09 +00:00
common [#400] Dynamic logic to infer procedures/hooks arguments. 2024-05-19 02:17:42 +02:00
config Support both @procedure and @procedure(name) notations. 2024-05-26 11:02:19 +02:00
context [#302] Merged pushbullet backend and plugin. 2024-01-09 23:46:07 +00:00
cron Added wait_stop method to the entities engine and cron scheduler. 2023-08-14 23:49:47 +02:00
entities 🐛 A proper cross-version solution for the utcnow() issue. 2024-06-01 01:34:47 +02:00
event 🐛 Fixed proper support for event package alias platypush.events. 2024-05-31 02:50:00 +02:00
exceptions Added support for JWT token-based authentication 2021-02-12 22:43:34 +01:00
install Clean up all package manager caches after Docker build. 2024-05-25 14:15:13 +02:00
message Set a plugin argument on AssistantEvents besides assistant. 2024-05-31 19:55:19 +02:00
migrations 🐛 Don't add the new password salt/iterations columns if already present. 2024-05-05 21:58:51 +02:00
platydock Adapted Platydock to the new Dockerfile format. 2024-05-25 10:17:45 +02:00
platyvenv [platyvenv] Add the venv bin directory to the PATH. 2023-10-22 02:28:31 +02:00
plugins 🐛 A proper cross-version solution for the utcnow() issue. 2024-06-01 01:34:47 +02:00
procedure Support both @procedure and @procedure(name) notations. 2024-05-26 11:02:19 +02:00
process Removed typing-extensions dependency. 2023-09-18 14:05:39 +02:00
runner Ensure that the application always terminates on Ctrl+C. 2023-10-22 02:33:15 +02:00
schemas [#398] Removed custom Response objects from Tensorflow and response docs generation logic. 2024-05-15 09:55:58 +02:00
user 🐛 A proper cross-version solution for the utcnow() issue. 2024-06-01 01:34:47 +02:00
utils 🐛 A proper cross-version solution for the utcnow() issue. 2024-06-01 01:34:47 +02:00
__init__.py Bump version: 1.0.3 → 1.0.4 2024-05-31 19:57:51 +02:00
__main__.py The __main__ function should take no arguments. 2023-08-17 01:35:39 +02:00
cli.py Added --db CLI option and support for configuration over environment. 2024-04-05 02:54:45 +02:00
components.json.gz [Automatic] Updated components cache 2024-05-31 17:59:06 +00:00
events Added platypush.events alias for platypush.message.event package. 2024-05-24 23:16:15 +02:00
logger.py Refactored structure of main application and startup scripts. 2023-07-23 23:12:36 +02:00