diff --git a/derivative/utils.py b/derivative/utils.py index 707f866..9b2e3e8 100644 --- a/derivative/utils.py +++ b/derivative/utils.py @@ -5,10 +5,11 @@ import numpy as np from scipy.special import binom -if sys.version_info < (3, 10): - from importlib_metadata import entry_points -else: +try: from importlib.metadata import entry_points +except ImportError: + # if sys.version_info < (3, 10): + from importlib_metadata import entry_points hyperparam_algorithms = entry_points(group="derivative.hyperparam_opt") diff --git a/pyproject.toml b/pyproject.toml index 238ebce..5e8e4f2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "derivative" -version = "0.6.1" +version = "0.6.2" description = "Numerical differentiation in python." repository = "https://github.com/andgoldschmidt/derivative" documentation = "https://derivative.readthedocs.io/" @@ -20,6 +20,9 @@ numpy = "^1.18.3" scipy = "^1.4.1" scikit-learn = "^1" +# third-party access to the functionality of importlib.metadata +importlib-metadata = "^7.1.0" + # docs sphinx = {version = "^5", optional = true} nbsphinx = {version = "^0.6.1", optional = true} @@ -32,12 +35,12 @@ matplotlib = {version = "^3.2.1", optional = true} pytest = {version = "^7", optional = true} [tool.poetry.extras] -docs = ["sphinx", "nbsphinx", "ipykernel", "jupyter_client", "matplotlib", "pandoc"] +docs = ["sphinx", "nbsphinx", "ipykernel", "jupyter_client", "matplotlib"] dev = ["pytest"] [build-system] requires = ["poetry-core>=1.1.0"] build-backend = "poetry.core.masonry.api" -[tool.poetry.plugins.'derivative.hyperparam_opt'] +[tool.poetry.plugins."derivative.hyperparam_opt"] "kalman.default" = "derivative.utils:_default_kalman"