-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove deprecated call to pkg_resources (#36)
* Remove deprecated call to pkg_resources * Fix import logic for older versions of Python * Drop Python 3.6 for importlib_metadata support * Fix python 3.8 * Require python>=3.8 * Require PyQt >= 5.14 in keeping with glue requirements * Add py311 test envs Co-authored-by: Derek Homeier <[email protected]> -----
- Loading branch information
Showing
4 changed files
with
19 additions
and
21 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
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,8 +1,10 @@ | ||
from pkg_resources import get_distribution, DistributionNotFound | ||
import sys | ||
|
||
if sys.version_info >= (3, 9): | ||
import importlib.metadata as importlib_metadata | ||
else: | ||
import importlib_metadata | ||
|
||
__all__ = ['__version__'] | ||
|
||
try: | ||
__version__ = get_distribution('echo').version | ||
except DistributionNotFound: | ||
__version__ = 'undefined' | ||
__version__ = importlib_metadata.version('echo') |
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
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