Closed bibajz closed 3 years ago
As noted in https://github.com/bibajz/bitcoin-python-async-rpc/issues/6#issuecomment-819139200, remembering to call BitcoinRPC.aclose to close the underlying httpx.AsyncClient feels repetitive and one may forget it.
BitcoinRPC.aclose
httpx.AsyncClient
Implement __aenter__ and __aexit__ coroutines which will handle the closing automatically.
__aenter__
__aexit__
Resolved in https://github.com/bibajz/bitcoin-python-async-rpc/commit/510ebe42616bb72a0db64e081be94002bc164fdf
As noted in https://github.com/bibajz/bitcoin-python-async-rpc/issues/6#issuecomment-819139200, remembering to call
BitcoinRPC.aclose
to close the underlyinghttpx.AsyncClient
feels repetitive and one may forget it.Implement
__aenter__
and__aexit__
coroutines which will handle the closing automatically.