Skip to content

Commit 29450c6

Browse files
authored
remove importlib-resources in favor of importlib.resources (#2719)
1 parent 5bd2305 commit 29450c6

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

python/prophet/models.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from typing import Sequence, Tuple
99
from collections import OrderedDict
1010
from enum import Enum
11-
import importlib_resources
11+
import importlib.resources
1212
import pathlib
1313
import platform
1414

@@ -92,7 +92,7 @@ class CmdStanPyBackend(IStanBackend):
9292
def __init__(self):
9393
import cmdstanpy
9494
# this must be set before super.__init__() for load_model to work on Windows
95-
local_cmdstan = importlib_resources.files("prophet") / "stan_model" / f"cmdstan-{self.CMDSTAN_VERSION}"
95+
local_cmdstan = importlib.resources.files("prophet") / "stan_model" / f"cmdstan-{self.CMDSTAN_VERSION}"
9696
if local_cmdstan.exists():
9797
cmdstanpy.set_cmdstan_path(str(local_cmdstan))
9898
super().__init__()
@@ -103,7 +103,7 @@ def get_type():
103103

104104
def load_model(self):
105105
import cmdstanpy
106-
model_file = importlib_resources.files("prophet") / "stan_model" / "prophet_model.bin"
106+
model_file = importlib.resources.files("prophet") / "stan_model" / "prophet_model.bin"
107107
return cmdstanpy.CmdStanModel(exe_file=str(model_file))
108108

109109
def fit(self, stan_init, stan_data, **kwargs):

python/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ dependencies = [
1919
"pandas>=1.3.5",
2020
"holidays>=0.25,<1",
2121
"tqdm>=4.63.2",
22-
"importlib_resources",
2322
]
2423
authors = [
2524
{name = "Sean J. Taylor", email = "sjtz@pm.me"},

0 commit comments

Comments
 (0)