MCPcopy Index your code
hub / github.com/python/cpython / downgrade_malformed_data_warning

Function downgrade_malformed_data_warning

Lib/test/test_socket.py:219–233  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

217
218@contextlib.contextmanager
219def downgrade_malformed_data_warning():
220 # This warning happens on macos and win, but does not always happen on linux.
221 if sys.platform not in {"win32", "darwin"}:
222 yield
223 return
224
225 with warnings.catch_warnings():
226 # TODO: gh-110012, we should investigate why this warning is happening
227 # and fix it properly.
228 warnings.filterwarnings(
229 action="always",
230 message="received malformed or improperly-truncated ancillary data",
231 category=RuntimeWarning,
232 )
233 yield
234
235
236HAVE_SOCKET_CAN = _have_socket_can()

Callers 3

checkTruncatedArrayMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…