From 827c1b66d249d538975a3d1a89dd6898ee631f1f Mon Sep 17 00:00:00 2001 From: Kevin Neal Date: Tue, 21 Mar 2023 11:44:00 -0700 Subject: [PATCH] refactor: rename "_get_default_session" to support use as public method Closes #2707 --- boto3/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/boto3/__init__.py b/boto3/__init__.py index bd1ddf79fb..b5f9d0bb8a 100644 --- a/boto3/__init__.py +++ b/boto3/__init__.py @@ -69,7 +69,7 @@ def set_stream_logger(name='boto3', level=logging.DEBUG, format_string=None): logger.addHandler(handler) -def _get_default_session(): +def get_default_session(): """ Get the default session, creating one if needed. @@ -83,6 +83,9 @@ def _get_default_session(): return DEFAULT_SESSION +_get_default_session = get_default_session + + def client(*args, **kwargs): """ Create a low-level service client by name using the default session.