Skip to content

Commit b61d7f2

Browse files
committed
fix for py 3.12 changes
1 parent eb8c827 commit b61d7f2

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/underworld/UWGeodynamics/_material.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ def __init__(self, filename=None):
303303

304304
if not filename:
305305
from importlib.resources import files
306-
filename = str(files(__name__).joinpath("resources/Materials.json"))
306+
filename = str(files(__package__).joinpath("resources/Materials.json"))
307307

308308
def get_value(item):
309309
value = item["value"]

src/underworld/UWGeodynamics/_melt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def __init__(self, filename=None):
6363

6464
if not filename:
6565
from importlib.resources import files
66-
filename = str(files(__name__).joinpath("resources/Solidus.json"))
66+
filename = str(files(__package__).joinpath("resources/Solidus.json"))
6767

6868
with open(filename, "r") as infile:
6969
_solidii = json.load(infile)
@@ -109,7 +109,7 @@ def __init__(self, filename=None):
109109

110110
if not filename:
111111
from importlib.resources import files
112-
filename = str(files(__name__).joinpath("resources/Liquidus.json"))
112+
filename = str(files(__package__).joinpath("resources/Liquidus.json"))
113113

114114
with open(filename, "r") as infile:
115115
_liquidii = json.load(infile)

src/underworld/UWGeodynamics/_rheology.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ def __init__(self, filename=None):
635635

636636
if not filename:
637637
from importlib.resources import files
638-
filename = str(files(__name__).joinpath("resources/ViscousRheologies.json"))
638+
filename = str(files(__package__).joinpath("resources/ViscousRheologies.json"))
639639

640640
with open(filename, "r") as infile:
641641
self._viscousLaws = json.load(infile)
@@ -686,7 +686,7 @@ def __init__(self, filename=None):
686686

687687
if not filename:
688688
from importlib.resources import files
689-
filename = str(files(__name__).joinpath("resources/PlasticRheologies.json"))
689+
filename = str(files(__package__).joinpath("resources/PlasticRheologies.json"))
690690

691691
with open(filename, "r") as infile:
692692
_plasticLaws = json.load(infile)

0 commit comments

Comments
 (0)