Skip to content
Myr

Merge branch 'develop' of github.com:kennethreitz/requests into develop

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

authored by Idan Gazit · committed by Idan Gazit · parents eae6414, 0dd6c40 · Browse files · 2 files+21 added−1 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+21 added−1 removed

  • other:+21 added−1 removed

2 files+21 added−1 removed

modified:requests/sessions.py+12 added
14 unmodified lines
15from .utils import header_expand16from .packages.urllib3.poolmanager import PoolManager171819def dict_to_sequence(d):20 """Returns an internal sequence dictionary update."""2122 if hasattr(d, 'items'):23 d = d.items()2425 return d262728def merge_kwargs(local_kwarg, default_kwarg):29 """Merges kwarg dictionaries.3031 If a local key in the dictionary is set to None, it will be removed.32 """3334353637 if default_kwarg is None:38 return local_kwarg3940 if isinstance(local_kwarg, str):
272 unmodified lines
modified:requests/utils.py+9 added-1 removed
12 unmodified lines
13import codecs14import os15import random16import re17import traceback17import zlib18from netrc import netrc, NetrcParseError1920from .compat import parse_http_list as _parse_list_header
3 unmodified lines
2425NETRC_FILES = ('.netrc', '_netrc')262728def dict_to_sequence(d):29 """Returns an internal sequence dictionary update."""3031 if hasattr(d, 'items'):32 d = d.items()3334 return d353637def get_netrc_auth(url):38 """Returns the Requests tuple auth for a given url from netrc."""3940 locations = (os.path.expanduser('~/{0}'.format(f)) for f in NETRC_FILES)
431 unmodified lines