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

This reverts commit cf0b803d50.
This commit is contained in:
Anders Kaseorg 2024-02-01 17:28:18 -08:00 committed by Anders Kaseorg
parent 4f27381ebc
commit 41f253774d
2 changed files with 0 additions and 15 deletions

View File

@ -754,7 +754,3 @@ class ZulipSCIMAuthCheckMiddleware(SCIMAuthCheckMiddleware):
return response return response
return None return None
class ZulipNoopMiddleware(MiddlewareMixin):
pass

View File

@ -15,7 +15,6 @@ from .settings import (
EXTERNAL_HOST, EXTERNAL_HOST,
LOCAL_DATABASE_PASSWORD, LOCAL_DATABASE_PASSWORD,
LOGGING, LOGGING,
MIDDLEWARE,
) )
FULL_STACK_ZULIP_TEST = "FULL_STACK_ZULIP_TEST" in os.environ FULL_STACK_ZULIP_TEST = "FULL_STACK_ZULIP_TEST" in os.environ
@ -269,13 +268,3 @@ SCIM_CONFIG: Dict[str, SCIMConfigDict] = {
"name_formatted_included": True, "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",
]