code-loader 1.0.17__tar.gz → 1.0.20__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: code-loader
3
- Version: 1.0.17
3
+ Version: 1.0.20
4
4
  Summary:
5
5
  Home-page: https://github.com/tensorleap/code-loader
6
6
  License: MIT
@@ -15,7 +15,7 @@ Classifier: Programming Language :: Python :: 3.10
15
15
  Classifier: Programming Language :: Python :: 3.11
16
16
  Requires-Dist: numpy (>=1.22.3,<2.0.0)
17
17
  Requires-Dist: psutil (>=5.9.5,<6.0.0)
18
- Requires-Dist: typeguard (>=2.13.3,<3.0.0)
18
+ Requires-Dist: typeguard (>=4.1.5,<5.0.0)
19
19
  Project-URL: Repository, https://github.com/tensorleap/code-loader
20
20
  Description-Content-Type: text/markdown
21
21
 
@@ -25,10 +25,15 @@ def get_root_traceback(exc_tb: TracebackType) -> TracebackType:
25
25
 
26
26
 
27
27
  def get_root_exception_line_number() -> int:
28
- exc_tb = sys.exc_info()[2]
28
+ root_exception = sys.exc_info()[1]
29
+ assert root_exception is not None
30
+ if root_exception.__context__ is not None:
31
+ root_exception = root_exception.__context__
32
+ traceback = root_exception.__traceback__
33
+
29
34
  root_exception_line_number = -1
30
- if exc_tb is not None:
31
- root_traceback = get_root_traceback(exc_tb)
35
+ if traceback is not None:
36
+ root_traceback = get_root_traceback(traceback)
32
37
  root_exception_line_number = root_traceback.tb_lineno
33
38
  return root_exception_line_number
34
39
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "code-loader"
3
- version = "1.0.17"
3
+ version = "1.0.20"
4
4
  description = ""
5
5
  authors = ["dorhar <doron.harnoy@tensorleap.ai>"]
6
6
  license = "MIT"
@@ -14,8 +14,8 @@ include = [
14
14
  [tool.poetry.dependencies]
15
15
  python = ">=3.8,<3.12"
16
16
  numpy = "^1.22.3"
17
- typeguard = "^2.13.3"
18
17
  psutil = "^5.9.5"
18
+ typeguard = "^4.1.5"
19
19
 
20
20
  [tool.poetry.dev-dependencies]
21
21
  pytest = "^7.1.1"
File without changes
File without changes