From 21241aa8d1e35dfdef4d0d3601bf0a7dc456ab2f Mon Sep 17 00:00:00 2001 From: aleksandarmijat Date: Wed, 3 Jul 2024 12:47:27 +0200 Subject: [PATCH 1/3] Explicitly filter out Sanic warnings after Sanic is initialized --- rasa_sdk/endpoint.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rasa_sdk/endpoint.py b/rasa_sdk/endpoint.py index a310ebe07..93d2e46be 100644 --- a/rasa_sdk/endpoint.py +++ b/rasa_sdk/endpoint.py @@ -114,6 +114,9 @@ def create_app( """ app = Sanic("rasa_sdk", configure_logging=False) + # Reset Sanic warnings filter that allows the triggering of Sanic warnings + warnings.filterwarnings("ignore", category=DeprecationWarning, module=r"sanic.*") + configure_cors(app, cors_origins) executor = ActionExecutor() From baa6d601eea6d166e32b56353be4e632f557640a Mon Sep 17 00:00:00 2001 From: aleksandarmijat Date: Wed, 3 Jul 2024 13:03:57 +0200 Subject: [PATCH 2/3] Add changelog file --- changelog/1120.misc.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog/1120.misc.md diff --git a/changelog/1120.misc.md b/changelog/1120.misc.md new file mode 100644 index 000000000..b3b002618 --- /dev/null +++ b/changelog/1120.misc.md @@ -0,0 +1 @@ +Added the functionality that resets the Sanic warnings filter, which was allowing the triggering of Sanic warnings. \ No newline at end of file From 0a0c9ac19d9e0aedd9a6b4e545228cc47d1a2b96 Mon Sep 17 00:00:00 2001 From: aleksandarmijat <162149565+aleksandarmijat@users.noreply.github.com> Date: Wed, 3 Jul 2024 13:10:26 +0200 Subject: [PATCH 3/3] Update changelog/1120.misc.md Co-authored-by: OLANIYI TAWAKALT --- changelog/1120.misc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog/1120.misc.md b/changelog/1120.misc.md index b3b002618..82d2414f4 100644 --- a/changelog/1120.misc.md +++ b/changelog/1120.misc.md @@ -1 +1 @@ -Added the functionality that resets the Sanic warnings filter, which was allowing the triggering of Sanic warnings. \ No newline at end of file +Reset Sanic warnings filter to prevent the triggering of Sanic warnings. \ No newline at end of file