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

Fixed a bug in the plugin iteration on Python 3.8 and 3.9 #2377

Merged
merged 1 commit into from
Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions glue/_plugin_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@
import os
import sys
from collections import defaultdict
from importlib.metadata import entry_points

if sys.version_info >= (3, 10):
from importlib.metadata import entry_points
else:
from importlib_metadata import entry_points

def iter_plugin_entry_points():
if sys.version_info >= (3, 10):
plugins = entry_points(group='glue.plugins')
else:
plugins = entry_points().get('glue.plugins', [])

return iter(plugins)
def iter_plugin_entry_points():
return iter(entry_points(group='glue.plugins'))


class PluginConfig(object):
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ install_requires =
mpl-scatter-density>=0.7
pvextractor>=0.2
importlib_resources>=1.3; python_version<'3.9'
importlib_metadata>=3.6; python_version<'3.10'

[options.entry_points]
glue.plugins =
Expand Down