Skip to content
Myr

Fix the tests and unseparate comments from code

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

See the comments on the previous few commits on GitHub.

authored by Ian Cordasco · committed by Ian Cordasco · parent aca91e0 · Browse files · 2 files+5 added−3 removed
This commit

State

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

Diff stats

2 files+5 added−3 removed

  • other:+5 added−3 removed

2 files+5 added−3 removed

modified:requests/models.py+1 added-1 removed
392 unmodified lines
393 body.seek(0, 0)394 elif body is not None:395 l = super_len(body)396 if l:397 self.headers['Content-Length'] = super_len(l)397 self.headers['Content-Length'] = str(l)398 elif self.method not in ('GET', 'HEAD'):399 self.headers['Content-Length'] = '0'400401 def prepare_auth(self, auth, url=''):
272 unmodified lines
modified:requests/sessions.py+4 added-2 removed
427 unmodified lines
428 return self.request('DELETE', url, **kwargs)429430 def send(self, request, **kwargs):431 """Send a given PreparedRequest."""432 # It's possible that users might accidentally send a Request object.433 # Guard against that specific failure case.432 # Set defaults that the hooks can utilize to ensure they always have433 # the correct parameters to reproduce the previous request.434 kwargs.setdefault('stream', False)435 kwargs.setdefault('verify', True)436 kwargs.setdefault('proxies', {})437438 # It's possible that users might accidentally send a Request object.439 # Guard against that specific failure case.440 if getattr(request, 'prepare', None):441 raise ValueError('You can only send PreparedRequests.')442443 # Set up variables needed for resolve_redirects and dispatching of
71 unmodified lines