Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
integrations: Convert deprecated Django url to path.
Anders Kaseorgbdb20a8002a0
diff --git a/zerver/lib/integrations.py b/zerver/lib/integrations.pyindex e42a0180a61..dc7dd8402d2 100644--- a/zerver/lib/integrations.py+++ b/zerver/lib/integrations.py@@ -2,9 +2,9 @@ import osfrom dataclasses import dataclass, fieldfrom typing import Any, Dict, List, Optional, Sequence, Tuple-from django.conf.urls import urlfrom django.contrib.staticfiles.storage import staticfiles_storage-from django.urls.resolvers import RegexPattern+from django.urls import path+from django.urls.resolvers import URLPatternfrom django.utils.functional import Promisefrom django.utils.module_loading import import_stringfrom django.utils.translation import gettext as gettext_lazy@@ -221,8 +221,8 @@ class WebhookIntegration(Integration):self.doc = doc@property- def url_object(self) -> RegexPattern:- return url(self.url, self.function)+ def url_object(self) -> URLPattern:+ return path(self.url, self.function)def split_fixture_path(path: str) -> Tuple[str, str]:diff --git a/zerver/webhooks/gitea/tests.py b/zerver/webhooks/gitea/tests.pyindex b492c0190c8..5c3b1af92dd 100644--- a/zerver/webhooks/gitea/tests.py+++ b/zerver/webhooks/gitea/tests.py@@ -5,7 +5,7 @@ from zerver.lib.test_classes import WebhookTestCaseclass GiteaHookTests(WebhookTestCase):STREAM_NAME = "commits"- URL_TEMPLATE = "/api/v1/external/giteae?&api_key={api_key}&stream={stream}"+ URL_TEMPLATE = "/api/v1/external/gitea?&api_key={api_key}&stream={stream}"FIXTURE_DIR_NAME = "gitea"def test_multiple_commits(self) -> None: