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

This reverts commit cf0b803d50.

(cherry picked from commit 41f253774d)
This commit is contained in:
Anders Kaseorg 2024-02-01 17:28:18 -08:00 committed by Tim Abbott
parent 81d78cb88c
commit 0c67227f88
2 changed files with 0 additions and 15 deletions

View File

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

View File

@ -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
@ -267,13 +266,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",
]