forked from open-telemetry/opentelemetry-python-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[boto3sqs] Reduce number of wrapper targets
There are actually 6 ways to initialize a boto3 API object. ```py boto3.client() # Using default global session boto3.resource() # Using default global session boto3.Session().client() # Using "re-exported" session.Session boto3.Session().resource() # Using "re-exported" session.Session boto3.session.Session().client() # Using session.Session directly boto3.session.Session().resource() # Using session.Session directly ``` We only have to patch `session.Session.client` to catch all the cases. - https://github.com/boto/boto3/blob/b3c158c62aa2a1314dc0ec78caea1ea976abd1a0/boto3/session.py#L217-L229 - https://github.com/boto/boto3/blob/b3c158c62aa2a1314dc0ec78caea1ea976abd1a0/boto3/session.py#L446-L457
- Loading branch information
1 parent
0d7748b
commit f634266
Showing
2 changed files
with
18 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters