-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix slow loading times from using pkg_resources (fixes #59)
- Loading branch information
1 parent
bcd01ce
commit 5e6891c
Showing
2 changed files
with
6 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# Changelog | ||
|
||
|
||
## Unreleased | ||
## v1.0.4 (2021-11-08) | ||
|
||
### Fixes | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# flake8: noqa | ||
import pkg_resources | ||
import importlib.metadata | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
sudodoki
|
||
|
||
from shortuuid.main import decode | ||
from shortuuid.main import encode | ||
|
@@ -9,7 +9,9 @@ | |
from shortuuid.main import ShortUUID | ||
from shortuuid.main import uuid | ||
|
||
|
||
try: | ||
__version__ = pkg_resources.get_distribution("shortuuid").version | ||
except pkg_resources.DistributionNotFound: | ||
_DISTRIBUTION_METADATA = importlib.metadata.metadata("shortuuid") | ||
__version__ = _DISTRIBUTION_METADATA["Version"] | ||
except Exception: | ||
__version__ = "0.0.0" |
@skorokithakis this causes an error in google colab.