diff --git a/src/dxtbx/format/Registry.py b/src/dxtbx/format/Registry.py index 9f4d74b75..03dc39e0d 100644 --- a/src/dxtbx/format/Registry.py +++ b/src/dxtbx/format/Registry.py @@ -34,7 +34,7 @@ def get_format_class_index() -> dict[str, tuple[Callable[[], type[Format]], list """ if not hasattr(get_format_class_index, "cache"): class_index = {} - for e in importlib.metadata.entry_points(group="dxtbx.format"): + for e in importlib.metadata.entry_points()["dxtbx.format"]: if ":" in e.name: format_name, base_classes_str = e.name.split(":", 1) base_classes = tuple(base_classes_str.split(",")) diff --git a/src/dxtbx/model/experiment_list.py b/src/dxtbx/model/experiment_list.py index 4b40cb311..d415e1ccd 100644 --- a/src/dxtbx/model/experiment_list.py +++ b/src/dxtbx/model/experiment_list.py @@ -322,7 +322,6 @@ def decode(self): # a sensible experiment. el = ExperimentList() for eobj in self._obj["experiment"]: - # Get the models identifier = eobj.get("identifier", "") beam = self._lookup_model("beam", eobj) @@ -466,9 +465,7 @@ def _lookup_model(self, name, experiment_dict): @staticmethod def _scaling_model_from_dict(obj): """Get the scaling model from a dictionary.""" - for entry_point in importlib.metadata.entry_points( - group="dxtbx.scaling_model_ext" - ): + for entry_point in importlib.metadata.entry_points()["dxtbx.scaling_model_ext"]: if entry_point.name == obj["__id__"]: return entry_point.load().from_dict(obj) diff --git a/src/dxtbx/model/profile.py b/src/dxtbx/model/profile.py index b452b0bd3..ba3852586 100644 --- a/src/dxtbx/model/profile.py +++ b/src/dxtbx/model/profile.py @@ -16,7 +16,7 @@ def from_dict(obj): """ if obj is None: return None - for entry_point in importlib.metadata.entry_points(group="dxtbx.profile_model"): + for entry_point in importlib.metadata.entry_points()["dxtbx.profile_model"]: if entry_point.name == obj["__id__"]: return entry_point.load().from_dict(obj) logging.getLogger("dxtbx.model.profile").warn(