From 41f253774d56f0851b36f1f6ed8080829ccc06c1 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Thu, 1 Feb 2024 17:28:18 -0800 Subject: [PATCH] Revert "zproject: Prevent having exactly 17/18 middlewares, for Python 3.11 bug." This reverts commit cf0b803d505047452d9f7b502ac64ade3d531214. --- zerver/middleware.py | 4 ---- zproject/test_extra_settings.py | 11 ----------- 2 files changed, 15 deletions(-) diff --git a/zerver/middleware.py b/zerver/middleware.py index ce1551c051..34291c5289 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 38a6920d5d..8348d5dc1e 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", - ]