From ab205cce6859cbd5414efb50e9548123ddd64d6d Mon Sep 17 00:00:00 2001 From: Felipe Date: Fri, 29 Mar 2024 09:20:48 -0700 Subject: [PATCH] Revert last commit --- copulas/__init__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/copulas/__init__.py b/copulas/__init__.py index 619d2230..a1f2b7d5 100644 --- a/copulas/__init__.py +++ b/copulas/__init__.py @@ -311,7 +311,13 @@ def _get_addon_target(addon_path_name): def _find_addons(): """Find and load all copulas add-ons.""" group = 'copulas_modules' - for entry_point in entry_points().select(group=group): + try: + eps = entry_points(group=group) + except TypeError: + # Load-time selection requires Python >= 3.10 or importlib_metadata >= 3.6 + eps = entry_points().get(group, []) + + for entry_point in eps: try: addon = entry_point.load() except Exception: # pylint: disable=broad-exception-caught