nshutils 0.12.2__tar.gz → 0.13.0__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.
- {nshutils-0.12.2 → nshutils-0.13.0}/PKG-INFO +1 -1
- {nshutils-0.12.2 → nshutils-0.13.0}/pyproject.toml +1 -1
- {nshutils-0.12.2 → nshutils-0.13.0}/src/nshutils/snoop.py +3 -3
- {nshutils-0.12.2 → nshutils-0.13.0}/README.md +0 -0
- {nshutils-0.12.2 → nshutils-0.13.0}/src/nshutils/__init__.py +0 -0
- {nshutils-0.12.2 → nshutils-0.13.0}/src/nshutils/actsave/__init__.py +0 -0
- {nshutils-0.12.2 → nshutils-0.13.0}/src/nshutils/actsave/_loader.py +0 -0
- {nshutils-0.12.2 → nshutils-0.13.0}/src/nshutils/actsave/_saver.py +0 -0
- {nshutils-0.12.2 → nshutils-0.13.0}/src/nshutils/collections.py +0 -0
- {nshutils-0.12.2 → nshutils-0.13.0}/src/nshutils/logging.py +0 -0
- {nshutils-0.12.2 → nshutils-0.13.0}/src/nshutils/typecheck.py +0 -0
@@ -1,4 +1,5 @@
|
|
1
1
|
import contextlib
|
2
|
+
import importlib.metadata
|
2
3
|
from typing import Any, Protocol, cast
|
3
4
|
|
4
5
|
from typing_extensions import TypeVar
|
@@ -18,7 +19,6 @@ try:
|
|
18
19
|
|
19
20
|
import pysnooper # type: ignore
|
20
21
|
import pysnooper.utils # type: ignore
|
21
|
-
from pkg_resources import DistributionNotFound, get_distribution
|
22
22
|
|
23
23
|
try:
|
24
24
|
import torch # type: ignore
|
@@ -38,8 +38,8 @@ try:
|
|
38
38
|
FLOATING_POINTS.add(getattr(torch, i))
|
39
39
|
|
40
40
|
try:
|
41
|
-
__version__ =
|
42
|
-
except
|
41
|
+
__version__ = importlib.metadata.version(__name__)
|
42
|
+
except importlib.metadata.PackageNotFoundError:
|
43
43
|
# package is not installed
|
44
44
|
pass
|
45
45
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|