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.

Revert "zproject: Prevent having exactly 17/18 middlewares, for Python 3.11 bug."

Anders Kaseorg41f253774d56
diff --git a/zerver/middleware.py b/zerver/middleware.py
index ce1551c051d..34291c5289c 100644
--- a/zerver/middleware.py
+++ b/zerver/middleware.py
@@ -754,7 +754,3 @@ class ZulipSCIMAuthCheckMiddleware(SCIMAuthCheckMiddleware):
return response
return None
-
-
-class ZulipNoopMiddleware(MiddlewareMixin):
- pass
diff --git a/zproject/test_extra_settings.py b/zproject/test_extra_settings.py
index 38a6920d5d1..8348d5dc1e2 100644
--- a/zproject/test_extra_settings.py
+++ b/zproject/test_extra_settings.py
@@ -15,7 +15,6 @@ from .settings import (
EXTERNAL_HOST,
LOCAL_DATABASE_PASSWORD,
LOGGING,
- MIDDLEWARE,
)
FULL_STACK_ZULIP_TEST = "FULL_STACK_ZULIP_TEST" in os.environ
@@ -269,13 +268,3 @@ SCIM_CONFIG: Dict[str, SCIMConfigDict] = {
"name_formatted_included": True,
}
}
-
-
-while len(MIDDLEWARE) < 19:
- # The following middleware serves to skip having exactly 17 or 18
- # middlewares, which can segfault Python 3.11 when running with
- # coverage enabled; see
- # https://github.com/python/cpython/issues/106092
- MIDDLEWARE += [
- "zerver.middleware.ZulipNoopMiddleware",
- ]