Skip to content
Myr

dict sequence

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 84d9a1b · Browse files · 2 files+12 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+12 added−1 removed

  • other:+12 added−1 removed

2 files+12 added−1 removed

modified:requests/sessions.py+3 added
29 unmodified lines
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