box / box/box-python-sdk

Configurations like timeout, proxy, and ssl_verify should be parameterised

Open
#885 1 comment 0 reactions 6 assignees Claimed by @mwwoda View on GitHub
enhancement
Dominant language
Python
Stars
459
Forks
223
Avg merge
8h 57m
Merged PRs (30d)
13

Description

Currently, in the Box SDK, configuring timeout, proxy, and SSL verify requires overriding the DefaultNetwork.request method.

class ProxyableBoxNetwork(DefaultNetwork):
def __init__(self, proxy_conf, verify, logger=None):
super(ProxyableBoxNetwork, self).__init__()

def request(self, method, url, access_token, **kwargs):
return super(ProxyableBoxNetwork, self).request(
method, url, access_token,
proxies=self._proxies,
verify=self._verify,
timeout=self._timeout,
**kwargs
)

Shouldn't these configurations be parameterised to allow straightforward setup without overriding?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.