Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

discover_modes emits DeprecationWarning: SelectableGroups dict interface is deprecated. Use select. #1034

Closed
pllim opened this issue Dec 9, 2022 · 0 comments · Fixed by #1036

Comments

@pllim
Copy link
Collaborator

pllim commented Dec 9, 2022

Saw this in astrowidgets dev testing (astropy/astrowidgets#156). Also see python/importlib_metadata#298 . I am going to ignore this warning downstream but you might want to consider addressing it here.

Example log: https://github.com/astropy/astrowidgets/actions/runs/3659056477/jobs/6184616525

>       iw = ImageWidget()

../../astrowidgets/tests/test_image_widget.py:268: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../astrowidgets/core.py:76: in __init__
    self._viewer = EnhancedCanvasView(logger=logger)
.../ginga/web/jupyterw/ImageViewJpw.py:417: in __init__
    ImageViewZoom.__init__(self, logger=logger, settings=settings,
.../ginga/web/jupyterw/ImageViewJpw.py:400: in __init__
    self.set_bindings(bindings)
.../ginga/web/jupyterw/ImageViewJpw.py:410: in set_bindings
    bindings.set_bindings(self)
.../ginga/Bindings.py:89: in set_bindings
    self.setup_settings_events(viewer, bindmap)
.../ginga/Bindings.py:157: in setup_settings_events
    from ginga.modes.modeinfo import available_modes
.../ginga/modes/modeinfo.py:60: in <module>
    discover_modes()
.../ginga/modes/modeinfo.py:30: in discover_modes
    discovered_modes = entry_points().get(group, [])
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = {'array_api': [EntryPoint(name='numpy', value='numpy.array_api', group='array_api')],
        'asdf_extensions': [EntryPoint(n..._finalize', value='setuptools.dist:_Distribution.finalize_options',
                                       group='setuptools.finalize_distribution_options')]}
name = 'ginga_modes', default = []

    def get(self, name, default=None):
>       self._warn()
E       DeprecationWarning: SelectableGroups dict interface is deprecated. Use select.

.../python3.11/importlib/metadata/__init__.py:443: DeprecationWarning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant