mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 09:21:39 +00:00
use certifi directly instead of requests
This commit is contained in:
parent
c09ac41b27
commit
78f5afff74
6 changed files with 11 additions and 10 deletions
|
@ -9,3 +9,4 @@ qdarkstyle<2.6
|
|||
aiorpcx>=0.9,<0.11
|
||||
aiohttp
|
||||
aiohttp_socks
|
||||
certifi
|
||||
|
|
|
@ -33,7 +33,7 @@ from collections import defaultdict
|
|||
|
||||
import aiorpcx
|
||||
from aiorpcx import RPCSession, Notification
|
||||
import requests
|
||||
import certifi
|
||||
|
||||
from .util import PrintError, ignore_exceptions, log_exceptions, bfh, SilentTaskGroup
|
||||
from . import util
|
||||
|
@ -49,7 +49,7 @@ if TYPE_CHECKING:
|
|||
from .network import Network
|
||||
|
||||
|
||||
ca_path = requests.certs.where()
|
||||
ca_path = certifi.where()
|
||||
|
||||
|
||||
class NotificationSession(RPCSession):
|
||||
|
|
|
@ -28,7 +28,7 @@ import time
|
|||
import traceback
|
||||
import json
|
||||
|
||||
import requests
|
||||
import certifi
|
||||
import urllib.parse
|
||||
import aiohttp
|
||||
|
||||
|
@ -49,7 +49,7 @@ from .network import Network
|
|||
REQUEST_HEADERS = {'Accept': 'application/bitcoin-paymentrequest', 'User-Agent': 'Electrum'}
|
||||
ACK_HEADERS = {'Content-Type':'application/bitcoin-payment','Accept':'application/bitcoin-paymentack','User-Agent':'Electrum'}
|
||||
|
||||
ca_path = requests.certs.where() # FIXME do we need to depend on requests here?
|
||||
ca_path = certifi.where()
|
||||
ca_list = None
|
||||
ca_keyID = None
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ import ssl
|
|||
import aiohttp
|
||||
from aiohttp_socks import SocksConnector, SocksVer
|
||||
from aiorpcx import TaskGroup
|
||||
import requests
|
||||
import certifi
|
||||
|
||||
from .i18n import _
|
||||
|
||||
|
@ -59,7 +59,7 @@ def inv_dict(d):
|
|||
return {v: k for k, v in d.items()}
|
||||
|
||||
|
||||
ca_path = requests.certs.where()
|
||||
ca_path = certifi.where()
|
||||
|
||||
|
||||
base_units = {'BTC':8, 'mBTC':5, 'bits':2, 'sat':0}
|
||||
|
|
|
@ -337,8 +337,8 @@ def load_certificates(ca_path):
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import requests
|
||||
import certifi
|
||||
|
||||
util.set_verbosity(True)
|
||||
ca_path = requests.certs.where()
|
||||
ca_path = certifi.where()
|
||||
ca_list, ca_keyID = load_certificates(ca_path)
|
||||
|
|
|
@ -44,7 +44,7 @@ def check_imports():
|
|||
import dns
|
||||
import pyaes
|
||||
import ecdsa
|
||||
import requests
|
||||
import certifi
|
||||
import qrcode
|
||||
import google.protobuf
|
||||
import jsonrpclib
|
||||
|
@ -58,7 +58,7 @@ def check_imports():
|
|||
from google.protobuf import descriptor_pb2
|
||||
from jsonrpclib import SimpleJSONRPCServer
|
||||
# make sure that certificates are here
|
||||
assert os.path.exists(requests.utils.DEFAULT_CA_BUNDLE_PATH)
|
||||
assert os.path.exists(certifi.where())
|
||||
|
||||
|
||||
if not is_android:
|
||||
|
|
Loading…
Add table
Reference in a new issue