MCPcopy
hub / github.com/aio-libs/aiohttp / feed_eof

Method feed_eof

aiohttp/parsers.py:151–168  ·  view source on GitHub ↗

send eof to all parsers, recursively.

(self)

Source from the content-addressed store, hash-verified

149 self._buffer.feed_data(data)
150
151 def feed_eof(self):
152 """send eof to all parsers, recursively."""
153 if self._parser:
154 try:
155 if self._buffer:
156 self._parser.send(b'')
157 self._parser.throw(EofStream())
158 except StopIteration:
159 self._output.feed_eof()
160 except EofStream:
161 self._output.set_exception(self._eof_exc_class())
162 except Exception as exc:
163 self._output.set_exception(exc)
164
165 self._parser = None
166 self._output = None
167
168 self._eof = True
169
170 def set_parser(self, parser, output=None):
171 """set parser to stream. return parser's DataQueue."""

Callers 14

test_at_eofFunction · 0.95
test_feed_parserFunction · 0.95
test_feed_eof_excFunction · 0.95
test_feed_eof_stopFunction · 0.95
test_feed_parser2Function · 0.95
test_eof_excFunction · 0.95
feed_dataMethod · 0.45
unset_parserMethod · 0.45

Calls 4

EofStreamClass · 0.85
throwMethod · 0.80
sendMethod · 0.45
set_exceptionMethod · 0.45

Tested by 10

test_at_eofFunction · 0.76
test_feed_parserFunction · 0.76
test_feed_eof_excFunction · 0.76
test_feed_eof_stopFunction · 0.76
test_feed_parser2Function · 0.76
test_eof_excFunction · 0.76