Closed
Description
Describe the bug
import awswrangler as wr
Also triggers an import of index_json
(from awswrangler/opensearch/_write.py
)
One of the parameters for index_json
initializes a boto3.Session() on import.
@_utils.check_optional_dependency(opensearchpy, "opensearchpy")
def index_json(
...
boto3_session: boto3.Session | None = boto3.Session(),
...
**kwargs: Any,
When running e.g., unit tests, this is quite annoying.
How to Reproduce
import awswrangler as wr
Expected behavior
import awswrangler as wr
should not initiate a boto3 session
Your project
No response
Screenshots
No response
OS
MacOS
Python version
3.12.9
AWS SDK for pandas version
3.12.1
Additional context
No response