Skip to content

Commit

Permalink
Merge pull request #348 from gluesolutions/remove-pkg-resources-call
Browse files Browse the repository at this point in the history
Remove pkg resources call
  • Loading branch information
astrofrog authored Apr 11, 2023
2 parents e939c49 + 8656816 commit 8cf90d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 2 additions & 6 deletions glue_jupyter/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import

from pkg_resources import get_distribution, DistributionNotFound
import importlib.metadata

from IPython.display import display

Expand All @@ -10,11 +10,7 @@
'JupyterApplication', 'set_layout_factory', 'get_layout_factory',
'__version__']

try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
# package is not installed
pass
__version__ = importlib.metadata.version(__name__)

LAYOUT_FACTORY = None

Expand Down
5 changes: 5 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ filterwarnings =
ignore:Widget.widgets is deprecated:DeprecationWarning
# deprecated in numpy 1.24, to be fixed in scikit-image 0.20:
ignore:`np.bool8` is a deprecated alias for `np.bool_`.:DeprecationWarning:skimage.util.dtype.*:
# Many glue plug-ins will trigger this until updated. Remove when common ones (e.g. vispy) have updated
ignore:pkg_resources is deprecated as an API:DeprecationWarning
# This catched a warning on mpl_toolkits which is currently unresolved
# https://github.com/matplotlib/matplotlib/pull/25381
ignore:Deprecated call to `pkg_resources.declare_namespace(.*)`:DeprecationWarning

[flake8]
max-line-length = 100

0 comments on commit 8cf90d0

Please sign in to comment.