Skip to content
Myr

Rename use_session to session.

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

authored by Shrikant Sharat · committed by Shrikant Sharat · parent 5c72601 · Browse files · 1 file+4 added−4 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+4 added−4 removed

  • other:+4 added−4 removed

1 file+4 added−4 removed

modified:requests/api.py+4 added-4 removed
9 unmodified lines
10:license: ISC, see LICENSE for more details.1112"""1314from .sessions import session14from . import sessions151617def request(method, url,18 params=None,
7 unmodified lines
26 proxies=None,27 hooks=None,28 return_response=True,29 prefetch=False,30 use_session=None,30 session=None,31 config=None):32 """Constructs and sends a :class:`Request <Request>`.33 Returns :class:`Response <Response>` object.34
8 unmodified lines
43 :param timeout: (optional) Float describing the timeout of the request.44 :param allow_redirects: (optional) Boolean. Set to True if POST/PUT/DELETE redirect following is allowed.45 :param proxies: (optional) Dictionary mapping protocol to the URL of the proxy.46 :param return_response: (optional) If False, an un-sent Request object will returned.47 :param use_session: (optional) A :class:`Session` object to be used for the request.47 :param session: (optional) A :class:`Session` object to be used for the request.48 :param config: (optional) A configuration dictionary.49 """5051 s = use_session or session()51 s = session or sessions.session()52 return s.request(53 method=method,54 url=url,55 params=params,
90 unmodified lines