The runtime library "msrest" for AutoRest generated Python clients.
Thanks to robgolding for his contribution
This released is designed to be backward compatible with 0.4.x, but there is too many internal refactoring and new features to continue with 0.4.x versionning
requests
for now. This driver API is not considered stable
and you should pin your msrest version if you want to provide a personal implementation.That will trigger a DeprecationWarning if an old Autorest generated code is used.
msrest is now able to keep the "requests.Session" alive for performance. To activate this behavior:
client.config.keep_alive = True
and client.close()
(requires generation with Autorest.Python 3.0.50 at least)client.config.keep_alive = True
and client._client.close() (not recommended, but available in old releases of SDK)All Authentication classes now define signed_session
and refresh_session
with an optional session
parameter.
To take benefits of the session improvement, a subclass of Authentication MUST add this optional parameter
and use it if it's not None
:
def signed_session(self, session=None):
session = session or requests.Session()
# As usual from here.