t-bug-catcher 0.4.5__tar.gz → 0.4.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. {t_bug_catcher-0.4.5 → t_bug_catcher-0.4.6}/PKG-INFO +1 -1
  2. {t_bug_catcher-0.4.5 → t_bug_catcher-0.4.6}/setup.cfg +1 -1
  3. {t_bug_catcher-0.4.5 → t_bug_catcher-0.4.6}/setup.py +1 -1
  4. {t_bug_catcher-0.4.5 → t_bug_catcher-0.4.6}/t_bug_catcher/__init__.py +1 -1
  5. {t_bug_catcher-0.4.5 → t_bug_catcher-0.4.6}/t_bug_catcher/jira.py +1 -1
  6. {t_bug_catcher-0.4.5 → t_bug_catcher-0.4.6}/t_bug_catcher/utils/common.py +14 -10
  7. {t_bug_catcher-0.4.5 → t_bug_catcher-0.4.6}/t_bug_catcher.egg-info/PKG-INFO +1 -1
  8. {t_bug_catcher-0.4.5 → t_bug_catcher-0.4.6}/tests/test_t_bug_catcher.py +1 -1
  9. {t_bug_catcher-0.4.5 → t_bug_catcher-0.4.6}/MANIFEST.in +0 -0
  10. {t_bug_catcher-0.4.5 → t_bug_catcher-0.4.6}/README.rst +0 -0
  11. {t_bug_catcher-0.4.5 → t_bug_catcher-0.4.6}/pyproject.toml +0 -0
  12. {t_bug_catcher-0.4.5 → t_bug_catcher-0.4.6}/requirements.txt +0 -0
  13. {t_bug_catcher-0.4.5 → t_bug_catcher-0.4.6}/t_bug_catcher/bug_catcher.py +0 -0
  14. {t_bug_catcher-0.4.5 → t_bug_catcher-0.4.6}/t_bug_catcher/bug_snag.py +0 -0
  15. {t_bug_catcher-0.4.5 → t_bug_catcher-0.4.6}/t_bug_catcher/config.py +0 -0
  16. {t_bug_catcher-0.4.5 → t_bug_catcher-0.4.6}/t_bug_catcher/exceptions.py +0 -0
  17. {t_bug_catcher-0.4.5 → t_bug_catcher-0.4.6}/t_bug_catcher/resources/whispers_config.yml +0 -0
  18. {t_bug_catcher-0.4.5 → t_bug_catcher-0.4.6}/t_bug_catcher/stack_saver.py +0 -0
  19. {t_bug_catcher-0.4.5 → t_bug_catcher-0.4.6}/t_bug_catcher/utils/__init__.py +0 -0
  20. {t_bug_catcher-0.4.5 → t_bug_catcher-0.4.6}/t_bug_catcher/utils/logger.py +0 -0
  21. {t_bug_catcher-0.4.5 → t_bug_catcher-0.4.6}/t_bug_catcher/workitems.py +0 -0
  22. {t_bug_catcher-0.4.5 → t_bug_catcher-0.4.6}/t_bug_catcher.egg-info/SOURCES.txt +0 -0
  23. {t_bug_catcher-0.4.5 → t_bug_catcher-0.4.6}/t_bug_catcher.egg-info/dependency_links.txt +0 -0
  24. {t_bug_catcher-0.4.5 → t_bug_catcher-0.4.6}/t_bug_catcher.egg-info/not-zip-safe +0 -0
  25. {t_bug_catcher-0.4.5 → t_bug_catcher-0.4.6}/t_bug_catcher.egg-info/requires.txt +0 -0
  26. {t_bug_catcher-0.4.5 → t_bug_catcher-0.4.6}/t_bug_catcher.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: t_bug_catcher
3
- Version: 0.4.5
3
+ Version: 0.4.6
4
4
  Summary: Bug catcher
5
5
  Home-page: https://www.thoughtful.ai/
6
6
  Author: Thoughtful
@@ -1,5 +1,5 @@
1
1
  [bumpversion]
2
- current_version = 0.4.5
2
+ current_version = 0.4.6
3
3
  commit = True
4
4
  tag = False
5
5
 
@@ -26,7 +26,7 @@ setup(
26
26
  packages=find_packages(include=["t_bug_catcher", "t_bug_catcher.*"]),
27
27
  test_suite="tests",
28
28
  url="https://www.thoughtful.ai/",
29
- version="0.4.5",
29
+ version="0.4.6",
30
30
  zip_safe=False,
31
31
  install_requires=install_requirements,
32
32
  include_package_data=True,
@@ -3,7 +3,7 @@
3
3
  __author__ = """Thoughtful"""
4
4
  __email__ = "support@thoughtful.ai"
5
5
  # fmt: off
6
- __version__ = '0.4.5'
6
+ __version__ = '0.4.6'
7
7
  # fmt: on
8
8
 
9
9
  from .bug_catcher import (
@@ -914,7 +914,7 @@ class Jira:
914
914
  if issue_status.lower() not in ["to do", "open"]:
915
915
  self.issue_transition(
916
916
  ticket_id=existing_ticket["id"],
917
- transition_id=self._transition_types.get("to do", "open"),
917
+ transition_id=self._transition_types.get("to do") or self._transition_types.get("open"),
918
918
  )
919
919
  self.update_comment(
920
920
  ticket_id=existing_ticket["id"],
@@ -1,3 +1,4 @@
1
+ import copy
1
2
  import traceback
2
3
  from datetime import date, datetime
3
4
  from json import JSONEncoder
@@ -20,21 +21,24 @@ class Encoder(JSONEncoder):
20
21
  Returns:
21
22
  str: The json string.
22
23
  """
24
+ object_copy = copy.deepcopy(o)
23
25
  try:
24
- if hasattr(o, "__dict__"):
26
+ if hasattr(object_copy, "__dict__"):
25
27
  keys_to_remove = [
26
- key for key in o.__dict__.keys() if any(s in str(key).lower() for s in CONFIG.KEYS_TO_REMOVE)
28
+ key
29
+ for key in object_copy.__dict__.keys()
30
+ if any(s in str(key).lower() for s in CONFIG.KEYS_TO_REMOVE)
27
31
  ]
28
32
  for key in keys_to_remove:
29
- del o.__dict__[key]
30
- return {str(key): str(value) for key, value in o.__dict__.items()}
31
- if isinstance(o, (datetime, date)):
32
- return o.isoformat()
33
- if isinstance(o, Path):
34
- return str(o)
35
- return super().default(self, o)
33
+ del object_copy.__dict__[key]
34
+ return {str(key): str(value) for key, value in object_copy.__dict__.items()}
35
+ if isinstance(object_copy, (datetime, date)):
36
+ return object_copy.isoformat()
37
+ if isinstance(object_copy, Path):
38
+ return str(object_copy)
39
+ return super().default(self, object_copy)
36
40
  except TypeError:
37
- return str(o)
41
+ return str(object_copy)
38
42
 
39
43
 
40
44
  def get_frames(exc_traceback: TracebackType) -> List:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: t_bug_catcher
3
- Version: 0.4.5
3
+ Version: 0.4.6
4
4
  Summary: Bug catcher
5
5
  Home-page: https://www.thoughtful.ai/
6
6
  Author: Thoughtful
@@ -65,7 +65,7 @@ class TestBugCatcher(unittest.TestCase):
65
65
  actual_call = mock_warning.call_args
66
66
  warning_message = actual_call[0][0]
67
67
  self.assertTrue(warning_message.startswith("Failed to create Jira issue due to"))
68
- self.assertEqual(mock_warning.call_count, 1)
68
+ self.assertEqual(mock_warning.call_count, 2)
69
69
 
70
70
 
71
71
  if __name__ == "__main__":
File without changes
File without changes