Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address deprecation warning emitted by django 3.1 #44

Merged
merged 1 commit into from
Aug 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions django_structlog/celery/signals.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import django.dispatch


bind_extra_task_metadata = django.dispatch.Signal(providing_args=["task", "logger"])
bind_extra_task_metadata = django.dispatch.Signal()
""" Signal to add extra ``structlog`` bindings from ``celery``'s task.

>>> from django.dispatch import receiver
Expand All @@ -14,7 +14,7 @@
"""


modify_context_before_task_publish = django.dispatch.Signal(providing_args=["context"])
modify_context_before_task_publish = django.dispatch.Signal()
""" Signal to modify context passed over to ``celery`` task's context. You must modify the ``context`` dict.

>>> from django.dispatch import receiver
Expand All @@ -33,7 +33,7 @@

"""

pre_task_succeeded = django.dispatch.Signal(providing_args=["task", "logger", "result"])
pre_task_succeeded = django.dispatch.Signal()
""" Signal to add ``structlog`` bindings from ``celery``'s successful task.

>>> from django.dispatch import receiver
Expand Down
12 changes: 3 additions & 9 deletions django_structlog/signals.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import django.dispatch


bind_extra_request_metadata = django.dispatch.Signal(
providing_args=["request", "logger"]
)
bind_extra_request_metadata = django.dispatch.Signal()
""" Signal to add extra ``structlog`` bindings from ``django``'s request.

>>> from django.dispatch import receiver
Expand All @@ -15,9 +13,7 @@

"""

bind_extra_request_finished_metadata = django.dispatch.Signal(
providing_args=["request", "logger", "response"]
)
bind_extra_request_finished_metadata = django.dispatch.Signal()
""" Signal to add extra ``structlog`` bindings from ``django``'s finished request and response.

>>> from django.dispatch import receiver
Expand All @@ -29,9 +25,7 @@

"""

bind_extra_request_failed_metadata = django.dispatch.Signal(
providing_args=["request", "logger", "exception"]
)
bind_extra_request_failed_metadata = django.dispatch.Signal()
""" Signal to add extra ``structlog`` bindings from ``django``'s failed request and exception.

>>> from django.dispatch import receiver
Expand Down