Skip to content

Commit

Permalink
Change conn.conn_kw's content instead of replacing it (#16587)
Browse files Browse the repository at this point in the history
* conn.conn_kw

* Update _bigger_block_size_http_adapters.py

Co-authored-by: Xiang Yan <xiangsjtu@gmail.com>
  • Loading branch information
jiasli and xiangyan99 authored Feb 8, 2021
1 parent 7817327 commit c897b16
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,7 @@ def get_connection(self, url, proxies=None):
conn = super(BiggerBlockSizeHTTPAdapter, self).get_connection(url, proxies)
system_version = tuple(sys.version_info)[:3]
if system_version[:2] >= (3, 7):
conn.conn_kw = {"blocksize": 32768}
if not conn.conn_kw:
conn.conn_kw = {}
conn.conn_kw['blocksize'] = 32768
return conn

0 comments on commit c897b16

Please sign in to comment.