Skip to content

Commit

Permalink
Fix for python 3.8, 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
devinrsmith committed Jan 14, 2022
1 parent 6793ee1 commit 8e79794
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/deephaven/plugin/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import abc
from typing import Union, Type

__version__ = '0.0.1.dev3'
__version__ = '0.0.1.dev4'

DEEPHAVEN_PLUGIN_ENTRY_KEY = 'deephaven.plugin'
DEEPHAVEN_PLUGIN_REGISTRATION_CLASS = 'registration_cls'
Expand Down Expand Up @@ -39,6 +39,11 @@ def collect_registration_entrypoints():
import sys
if sys.version_info < (3, 8):
from importlib_metadata import entry_points
elif sys.version_info < (3, 10):
from importlib.metadata import entry_points as ep

def entry_points(group, name):
return [e for e in ep()[group] if e.name == name]
else:
from importlib.metadata import entry_points
return entry_points(
Expand Down

0 comments on commit 8e79794

Please sign in to comment.