mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-28 07:51:27 +00:00
fix some DeprecationWarnings
This commit is contained in:
parent
4f70da6e15
commit
bdb6d65cf7
1 changed files with 3 additions and 3 deletions
|
@ -762,7 +762,7 @@ def parse_URI(uri: str, on_pr: Callable=None) -> dict:
|
||||||
out['address'] = address
|
out['address'] = address
|
||||||
if 'amount' in out:
|
if 'amount' in out:
|
||||||
am = out['amount']
|
am = out['amount']
|
||||||
m = re.match('([0-9\.]+)X([0-9])', am)
|
m = re.match(r'([0-9.]+)X([0-9])', am)
|
||||||
if m:
|
if m:
|
||||||
k = int(m.group(2)) - 8
|
k = int(m.group(2)) - 8
|
||||||
amount = Decimal(m.group(1)) * pow( Decimal(10) , k)
|
amount = Decimal(m.group(1)) * pow( Decimal(10) , k)
|
||||||
|
@ -965,10 +965,10 @@ def make_aiohttp_session(proxy: Optional[dict], headers=None, timeout=None):
|
||||||
username=proxy.get('user', None),
|
username=proxy.get('user', None),
|
||||||
password=proxy.get('password', None),
|
password=proxy.get('password', None),
|
||||||
rdns=True,
|
rdns=True,
|
||||||
ssl_context=ssl_context,
|
ssl=ssl_context,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
connector = aiohttp.TCPConnector(ssl_context=ssl_context)
|
connector = aiohttp.TCPConnector(ssl=ssl_context)
|
||||||
|
|
||||||
return aiohttp.ClientSession(headers=headers, timeout=timeout, connector=connector)
|
return aiohttp.ClientSession(headers=headers, timeout=timeout, connector=connector)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue