Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

settings: Silence CryptographyDeprecationWarning spam from a dependency.

Mateusz Mandera1df725e6f17b
diff --git a/zproject/computed_settings.py b/zproject/computed_settings.py
index 3771d246b46..23b7183220d 100644
--- a/zproject/computed_settings.py
+++ b/zproject/computed_settings.py
@@ -1,11 +1,13 @@
import os
import sys
import time
+import warnings
from copy import deepcopy
from pathlib import PosixPath
from typing import Any, Dict, List, Tuple, Union
from urllib.parse import urljoin
+from cryptography.utils import CryptographyDeprecationWarning
from django.template.loaders import app_directories
import zerver.lib.logging_util
@@ -969,6 +971,11 @@ LOGGING: Dict[str, Any] = {
},
}
+# Silence CryptographyDeprecationWarning spam from a dependency:
+# /srv/zulip-py3-venv/lib/python3.6/site-packages/jose/backends/cryptography_backend.py:18: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
+# TODO: Clean this up when possible after future dependency upgrades.
+warnings.filterwarnings("ignore", category=CryptographyDeprecationWarning, module="jose.*")
+
if DEVELOPMENT:
CONTRIBUTOR_DATA_FILE_PATH = os.path.join(DEPLOY_ROOT, "var/github-contributors.json")
else: