This repository was archived by the owner on Dec 19, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 1- __version__ = '0.2.0.rc.1.4 '
1+ __version__ = '0.2.0.rc.2.0 '
Original file line number Diff line number Diff line change @@ -11,15 +11,16 @@ def __init__ (self, **kwargs):
1111 self .__config = kwargs
1212 self .__base_url = self .__config .get ('base_url' )
1313 self .__use_db_cache = self .__config .get ('use_db_cache' , True )
14-
14+ self . __timeout = self . __config . get ( 'timeout' , 30 )
1515 self .__session = requests .Session ()
16- self .__session .mount (self .__base_url , HTTP20Adapter (timeout = self .__config . get ( 'timeout' , 30 ) ))
16+ self .__session .mount (self .__base_url , HTTP20Adapter (timeout = self .__timeout ))
1717
1818 @property
1919 def use_db_cache (self ):
2020 return self .__use_db_cache
2121
2222 def _do_request (self , * args , ** kwargs ):
23+ kwargs ['timeout' ] = kwargs .get ('timeout' , self .__timeout )
2324 try :
2425 return self .__session .request (* args , ** kwargs )
2526 except :
Original file line number Diff line number Diff line change 1111 url = 'https://github.com/phillmac/py-orbit-db-http-client' ,
1212 packages = find_packages (),
1313 install_requires = [
14- 'requests >= 2.11'
14+ 'requests >= 2.11' ,
15+ 'hyper >= 0.8.0.dev0'
1516 ],
1617 classifiers = [
1718 'Programming Language :: Python :: 3' ,
You can’t perform that action at this time.
0 commit comments