Closed olethanh closed 1 month ago
Summary:
This PR introduces a refactoring of the asynchronous context management methods in the AuthenticatedAlephHttpClient
and AlephHttpClient
classes. The changes include:
__aenter__
method from AuthenticatedAlephHttpClient
.__aexit__
method in AlephHttpClient
to ensure the HTTP session is closed only if it has been initialized.Explanation:
The removal of the __aenter__
method from AuthenticatedAlephHttpClient
simplifies the class and removes unnecessary functionality. The modification in AlephHttpClient
ensures that the HTTP session is properly closed even in case of an error, preventing potential resource leaks.
These changes are significant as they affect the handling of asynchronous operations and resource management, which could potentially impact the stability and performance of the application. Therefore, a thorough review is advised to ensure compatibility with existing workflows and to minimize the risk of introducing bugs.
…using issue