Anders Kaseorg
ac2b1cd45d
worker: Address sentry_sdk deprecations.
...
https://docs.sentry.io/platforms/python/migration/1.x-to-2.x#scope-configuring
https://github.com/getsentry/sentry-python/releases/2.0.0
https://github.com/getsentry/sentry-python/releases/2.15.0
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-10-22 10:05:01 -07:00
Anders Kaseorg
b96feb34f6
ruff: Fix SIM117 Use a single `with` statement with multiple contexts.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-14 13:48:32 -07:00
Anders Kaseorg
0fa5e7f629
ruff: Fix UP035 Import from `collections.abc`, `typing` instead.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-13 22:28:22 -07:00
Anders Kaseorg
531b34cb4c
ruff: Fix UP007 Use `X | Y` for type annotations.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-13 22:28:22 -07:00
Anders Kaseorg
e08a24e47f
ruff: Fix UP006 Use `list` instead of `List` for type annotation.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-13 22:28:22 -07:00
Alex Vandiver
572fbfe114
queue_processors: Pass the worker_num down into the class.
2024-05-02 14:25:10 -07:00
Anders Kaseorg
d32d4434dd
partial: Replace returns plugin with an annotation.
...
The returns plugin hasn’t been updated for mypy ≥ 1.6. This
annotation is more limited in that it only supports a fixed number of
positional arguments and no keyword arguments, but is good enough for
our purposes.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-04-29 17:14:41 -07:00
Anders Kaseorg
72aeaf8d52
db: Split reset_queries into a new module zerver.lib.db_connections.
...
Fixes an import cycle that breaks mypy inference with django-stubs:
zproject.settings → zproject.computed_settings → zerver.lib.db →
django.db → django.db.backends.base.base →
django.db.backends.base.features → django.db.models.base →
django.db.models.options → django.contrib.contenttypes.fields →
django.contrib.contenttypes.models → confirmation.models → django.conf
→ zproject.settings
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-04-17 16:49:03 -07:00
Alex Vandiver
5654d051f7
worker: Split into separate files.
...
This makes each worker faster to start up.
2024-04-16 23:00:02 -07:00