Skip to content
Myr

generator rejection

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kenneth Reitz · committed by Kenneth Reitz · parent a75ba04 · Browse files · 1 file+6 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−2 removed

  • other:+6 added−2 removed

1 file+6 added−2 removed

modified:requests/models.py+6 added-2 removed
7 unmodified lines
8"""910# import os11# import socket1213import collections14import logging1516# from datetime import datetime17from io import BytesIO1718from types import GeneratorType19from .hooks import dispatch_hook, default_hooks20from .structures import CaseInsensitiveDict21from .status_codes import codes22
282 unmodified lines
305 self.headers = CaseInsensitiveDict()306307 def prepare_body(self, data, files):308 """Prepares the given HTTP body data."""308 # if a generator is provided, error out.309310 # If a generator is provided, error out.311 if isinstance(data, types.GeneratorType)312 raise NotImplementedError('Generator bodies are not supported yet.')313314 # Nottin' on you.315 body = None316 content_type = None317
283 unmodified lines