Skip to content
Myr

further remove config

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 8cf6a35 · Browse files · 3 files+2 added−28 removed
This commit

State

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

Diff stats

3 files+2 added−28 removed

  • other:+2 added−28 removed

3 files+2 added−28 removed

modified:requests/adapters.py-6 removed
162 unmodified lines
163 if prefetch:164 r.content165166 return r167168169170171172
modified:requests/api.py+1 added-13 removed
28 unmodified lines
29 :param timeout: (optional) Float describing the timeout of the request.30 :param allow_redirects: (optional) Boolean. Set to True if POST/PUT/DELETE redirect following is allowed.31 :param proxies: (optional) Dictionary mapping protocol to the URL of the proxy.32 :param return_response: (optional) If False, an un-sent Request object will returned.33 :param session: (optional) A :class:`Session` object to be used for the request.34 :param config: (optional) A configuration dictionary. See ``request.defaults`` for allowed keys and their default values.33 :param verify: (optional) if ``True``, the SSL cert will be verified. A CA_BUNDLE path can also be provided.34 :param prefetch: (optional) if ``True``, the response content will be immediately downloaded.35 :param cert: (optional) if String, path to ssl client cert file (.pem). If Tuple, ('cert', 'key') pair.36 """3740 # if this session was passed in, leave it open (and retain pooled connections);41 # if we're making it just for this call, then close it when we're done.42 adhoc_session = False43 session = kwargs.pop('session', None)44 if session is None:45 session = sessions.session(config=kwargs.get('config', None))46 adhoc_session = True47 # Todo, close sessions after?484938 session = sessions.Session()39 return session.request(method=method, url=url, **kwargs)404142def get(url, **kwargs):
24 unmodified lines
67 :param url: URL for the new :class:`Request` object.68 :param \*\*kwargs: Optional arguments that ``request`` takes.69 """7082 kwargs.setdefault('allow_redirects', False)71 return request('head', url, **kwargs)727374def post(url, data=None, **kwargs):
40 unmodified lines
modified:requests/sessions.py+1 added-9 removed
7 unmodified lines
8requests (cookies, auth, proxies).910"""1112from copy import deepcopy12from .compat import cookielib13from .cookies import cookiejar_from_dict, remove_cookie_by_name14from .models import Request15from .hooks import dispatch_hook16from .utils import header_expand, from_key_val_list, default_headers18from .packages.urllib3.poolmanager import PoolManager17from .exceptions import TooManyRedirects1819from .compat import urlparse, urljoin20from .adapters import HTTPAdapter
110 unmodified lines
131 """A Requests session."""132133 __attrs__ = [134 'headers', 'cookies', 'auth', 'timeout', 'proxies', 'hooks',137 'params', 'config', 'verify', 'cert', 'prefetch']135 'params', 'verify', 'cert', 'prefetch']136137 def __init__(self,138 headers=None,139 cookies=None,
1 unmodified line
141 timeout=None,142 proxies=None,143 hooks=None,144 params=None,147 config=None,145 prefetch=True,146 verify=True,147 cert=None):148
21 unmodified lines
170 #: :class:`Request <Request>`. The dictionary values may be lists for171 #: representing multivalued query parameters.172 self.params = from_key_val_list(params or [])173177 #: Dictionary of configuration parameters for this178 #: :class:`Session <Session>`.179 self.config = from_key_val_list(config or {})180174 #: Prefetch response content.175 self.prefetch = prefetch176177 #: SSL Verification.
36 unmodified lines
214 allow_redirects=True,215 proxies=None,216 hooks=None,217 return_response=True,225 config=None,218 prefetch=None,219 verify=None,220 cert=None):221
126 unmodified lines