diff --git a/CHANGELOG.md b/CHANGELOG.md index 496787a58d..6eb885081b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ - Test `JaxSolver`'s compatibility with Python `3.8`, `3.9`, `3.10`, and `3.11` ([#2958](https://github.com/pybamm-team/PyBaMM/pull/2958)) - Update Jax (0.4.8) and JaxLib (0.4.7) compatibility ([#2927](https://github.com/pybamm-team/PyBaMM/pull/2927)) +- Removed `importlib_metadata` as a required dependency for user installations ([#3050](https://github.com/pybamm-team/PyBaMM/pull/3050)) ## Bug fixes diff --git a/pybamm/parameters/parameter_sets.py b/pybamm/parameters/parameter_sets.py index 19871f1ee6..5b1dc6e8d5 100644 --- a/pybamm/parameters/parameter_sets.py +++ b/pybamm/parameters/parameter_sets.py @@ -1,5 +1,5 @@ import warnings -import importlib_metadata +import importlib.metadata import textwrap from collections.abc import Mapping @@ -36,9 +36,7 @@ class ParameterSets(Mapping): def __init__(self): # Dict of entry points for parameter sets, lazily load entry points as self.__all_parameter_sets = dict() - for entry_point in importlib_metadata.entry_points( - group="pybamm_parameter_sets" - ): + for entry_point in importlib.metadata.entry_points()["pybamm_parameter_sets"]: self.__all_parameter_sets[entry_point.name] = entry_point def __new__(cls): diff --git a/setup.py b/setup.py index 537464777c..2db28f2f6d 100644 --- a/setup.py +++ b/setup.py @@ -211,7 +211,6 @@ def compile_KLU(): "scikit-fem>=0.2.0", "casadi>=3.6.0", "imageio>=2.9.0", - "importlib-metadata", "pybtex>=0.24.0", "sympy>=1.8", "xarray",