MCPcopy Index your code
hub / github.com/cloudpipe/cloudpickle / subprocess_pickle_echo

Function subprocess_pickle_echo

tests/testutils.py:83–94  ·  view source on GitHub ↗

Echo function with a child Python process Pickle the input data into a buffer, send it to a subprocess via stdin, expect the subprocess to unpickle, re-pickle that data back and send it back to the parent process via stdout for final unpickling. >>> subprocess_pickle_echo([1, 'a', No

(input_data, protocol=None, timeout=TIMEOUT, add_env=None)

Source from the content-addressed store, hash-verified

81
82
83def subprocess_pickle_echo(input_data, protocol=None, timeout=TIMEOUT, add_env=None):
84 """Echo function with a child Python process
85 Pickle the input data into a buffer, send it to a subprocess via
86 stdin, expect the subprocess to unpickle, re-pickle that data back
87 and send it back to the parent process via stdout for final unpickling.
88 >>> subprocess_pickle_echo([1, 'a', None])
89 [1, 'a', None]
90 """
91 out = subprocess_pickle_string(
92 input_data, protocol=protocol, timeout=timeout, add_env=add_env
93 )
94 return loads(out)
95
96
97def _read_all_bytes(stream_in, chunk_size=4096):

Calls 1

subprocess_pickle_stringFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…