MCPcopy
hub / github.com/pallets/flask / make_null_session

Method make_null_session

src/flask/sessions.py:150–160  ·  view source on GitHub ↗

Creates a null session which acts as a replacement object if the real session support could not be loaded due to a configuration error. This mainly aids the user experience because the job of the null session is to still support lookup without complaining but modific

(self, app: Flask)

Source from the content-addressed store, hash-verified

148 pickle_based = False
149
150 def make_null_session(self, app: Flask) -> NullSession:
151 """Creates a null session which acts as a replacement object if the
152 real session support could not be loaded due to a configuration
153 error. This mainly aids the user experience because the job of the
154 null session is to still support lookup without complaining but
155 modifications are answered with a helpful error message of what
156 failed.
157
158 This creates an instance of :attr:`null_session_class` by default.
159 """
160 return self.null_session_class()
161
162 def is_null_session(self, obj: object) -> bool:
163 """Checks if a given object is a null session. Null sessions are

Callers 1

pushMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected