From 3e39f8e740c70112a529e45753ef7da31fe362b8 Mon Sep 17 00:00:00 2001 From: Max Belanger Date: Wed, 8 May 2024 10:36:41 -0700 Subject: [PATCH] better comments --- dropbox/session.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dropbox/session.py b/dropbox/session.py index 2fae9ecc..c157c7da 100644 --- a/dropbox/session.py +++ b/dropbox/session.py @@ -51,14 +51,17 @@ def init_poolmanager(self, connections, maxsize, block=False, **_): ) def pinned_session(pool_maxsize=8, ca_certs=None): + # always verify, use cert bundle if provided + _session = requests.session() - # always verify, use cert bundle if provided + # requests if ca_certs is not None: _session.verify = ca_certs else: _session.verify = True + # urllib3 within requests http_adapter = _SSLAdapter(pool_connections=4, pool_maxsize=pool_maxsize, ca_certs=ca_certs) _session.mount('https://', http_adapter) return _session