boto3-refresh-session 0.1.17__tar.gz → 0.1.18__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: boto3-refresh-session
3
- Version: 0.1.17
3
+ Version: 0.1.18
4
4
  Summary: A simple Python package for refreshing boto3 sessions automatically.
5
5
  License: MIT
6
6
  Keywords: boto3,botocore,aws
@@ -14,7 +14,7 @@ object.
14
14
  """
15
15
  __all__ = ["AutoRefreshableSession"]
16
16
 
17
- import logging
17
+ from logging import INFO, basicConfig, getLogger
18
18
  from typing import Type
19
19
 
20
20
  from attrs import define, field
@@ -27,13 +27,12 @@ from botocore.credentials import (
27
27
  from botocore.session import get_session
28
28
 
29
29
  # configuring logging
30
- logging.basicConfig(
31
- level=logging.INFO,
32
- format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
30
+ basicConfig(
31
+ level=INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s"
33
32
  )
34
33
 
35
34
  # creating logger
36
- logger = logging.getLogger(__name__)
35
+ logger = getLogger(__name__)
37
36
 
38
37
 
39
38
  @define
@@ -137,6 +136,7 @@ class AutoRefreshableSession:
137
136
  AWS temporary credentials.
138
137
  """
139
138
 
139
+ # being careful not to duplicate logs
140
140
  msg = "Refreshing temporary AWS credentials"
141
141
  if self.defer_refresh and self._creds_already_fetched:
142
142
  logger.info(msg)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "boto3-refresh-session"
3
- version = "0.1.17"
3
+ version = "0.1.18"
4
4
  description = "A simple Python package for refreshing boto3 sessions automatically."
5
5
  authors = [
6
6
  {name = "Mike Letts",email = "lettsmt@gmail.com"}