# Buggy code
def should_bypass_proxies_patched(should_bypass_proxies_func, url, no_proxy):
    # Monkey patch requests, per https://github.com/requests/requests/pull/4723
    if url.startswith("file://"):
        return True
    return should_bypass_proxies_func(url, no_proxy)


# Traceback (TypeError)
~ $ conda update --all
Solving environment: failed

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

Traceback (most recent call last):
File "/Users/apple/anaconda/lib/python3.6/site-packages/conda/exceptions.py", line 819, in __call__
return func(*args, **kwargs)
File "/Users/apple/anaconda/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main
exit_code = do_call(args, p)
File "/Users/apple/anaconda/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call
exit_code = getattr(module, func_name)(args, parser)
File "/Users/apple/anaconda/lib/python3.6/site-packages/conda/cli/main_update.py", line 14, in execute
install(args, parser, 'update')
File "/Users/apple/anaconda/lib/python3.6/site-packages/conda/cli/install.py", line 235, in install
force_reinstall=context.force,
File "/Users/apple/anaconda/lib/python3.6/site-packages/conda/core/solve.py", line 506, in solve_for_transaction
force_remove, force_reinstall)
File "/Users/apple/anaconda/lib/python3.6/site-packages/conda/core/solve.py", line 439, in solve_for_diff
final_precs = self.solve_final_state(deps_modifier, prune, ignore_pinned, force_remove)
File "/Users/apple/anaconda/lib/python3.6/site-packages/conda/core/solve.py", line 180, in solve_final_state
index, r = self._prepare(prepared_specs)
File "/Users/apple/anaconda/lib/python3.6/site-packages/conda/core/solve.py", line 580, in _prepare
self.subdirs, prepared_specs)
File "/Users/apple/anaconda/lib/python3.6/site-packages/conda/core/index.py", line 215, in get_reduced_index
new_records = query_all(spec)
File "/Users/apple/anaconda/lib/python3.6/site-packages/conda/core/index.py", line 184, in query_all
return tuple(concat(future.result() for future in as_completed(futures)))
File "/Users/apple/anaconda/lib/python3.6/site-packages/conda/core/subdir_data.py", line 94, in query
self.load()
File "/Users/apple/anaconda/lib/python3.6/site-packages/conda/core/subdir_data.py", line 148, in load
_internal_state = self._load()
File "/Users/apple/anaconda/lib/python3.6/site-packages/conda/core/subdir_data.py", line 216, in _load
mod_etag_headers.get('_mod'))
File "/Users/apple/anaconda/lib/python3.6/site-packages/conda/core/subdir_data.py", line 416, in fetch_repodata_remote_request
timeout=timeout)
File "/Users/apple/.local/lib/python3.6/site-packages/requests/sessions.py", line 480, in get
return self.request('GET', url, **kwargs)
File "/Users/apple/.local/lib/python3.6/site-packages/requests/sessions.py", line 459, in request
prep.url, proxies, stream, verify, cert
File "/Users/apple/.local/lib/python3.6/site-packages/requests/sessions.py", line 617, in merge_environment_settings
env_proxies = get_environ_proxies(url) or {}
File "/Users/apple/.local/lib/python3.6/site-packages/requests/utils.py", line 562, in get_environ_proxies
if should_bypass_proxies(url):
TypeError: should_bypass_proxies_patched() missing 1 required positional argument: 'no_proxy'

`$ /Users/apple/anaconda/bin/conda update --all`

environment variables:
CIO_TEST=<not set>
CONDA_ROOT=/Users/apple/anaconda
PATH=~/Library/Python/2.7/bin:/Users/apple/anaconda/bin:/usr/bin:/bin:/usr/
sbin:/sbin:/usr/local/bin:/Library/TeX/texbin:/opt/X11/bin:/Library/Fr
ameworks/Mono.framework/Versions/Current/Commands:/Applications/Wiresh
ark.app/Contents/MacOS
REQUESTS_CA_BUNDLE=<not set>
SSL_CERT_FILE=<not set>

# Fixed code
def should_bypass_proxies_patched(should_bypass_proxies_func, url, no_proxy):
    # Monkey patch requests, per https://github.com/requests/requests/pull/4723
    if url.startswith("file://"):
        return True
    try:
        return should_bypass_proxies_func(url, no_proxy)
    except TypeError:
        # For versions of requests we shouldn't have to deal with.
        # https://github.com/conda/conda/issues/7503
        # https://github.com/conda/conda/issues/7506
        return should_bypass_proxies_func(url)