Skip to content
Myr

Make BaseAdapter describe the mandatory adapter interface (#3216)

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

* BaseAdapter definition of send is missing mandatory params * Copy over relevant parts of the interface documentation * Indentation fix * Change base class documentation for close

authored by Seppo Yli-Olli · committed by Ian Cordasco · parent 49b69c4 · Browse files · 1 file+15 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

1 file+15 added−1 removed

  • other:+15 added−1 removed

1 file+15 added−1 removed

modified:requests/adapters.py+15 added-1 removed
52 unmodified lines
5354 def __init__(self):55 super(BaseAdapter, self).__init__()5657 def send(self):57 def send(self, request, stream=False, timeout=None, verify=True,58 cert=None, proxies=None):59 """Sends PreparedRequest object. Returns Response object.6061 :param request: The :class:`PreparedRequest <PreparedRequest>` being sent.62 :param stream: (optional) Whether to stream the request content.63 :param timeout: (optional) How long to wait for the server to send64 data before giving up, as a float, or a :ref:`(connect timeout,65 read timeout) <timeouts>` tuple.66 :type timeout: float or tuple67 :param verify: (optional) Whether to verify SSL certificates.68 :param cert: (optional) Any user-provided SSL certificate to be trusted.69 :param proxies: (optional) The proxies dictionary to apply to the request.70 """71 raise NotImplementedError7273 def close(self):74 """Cleans up adapter specific items."""75 raise NotImplementedError767778class HTTPAdapter(BaseAdapter):
419 unmodified lines