Skip to content

Commit 9c971bb

Browse files
__package__ → __spec__.parent
Remove deprecated __package__, scheduled for removal in Python 3.15: https://docs.python.org/3.15/reference/datamodel.html#module.__package__
1 parent 0d40a60 commit 9c971bb

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

dask/array/tests/test_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def test_api():
2121
m
2222
for m, mod in member_dict.items()
2323
if m not in DA_EXPORTED_SUBMODULES
24-
if isinstance(mod, ModuleType) and mod.__package__ == "dask.array"
24+
if isinstance(mod, ModuleType) and mod.__spec__.parent == "dask.array"
2525
}
2626
# imported utility modules
2727
members -= {"annotations", "builtins", "importlib", "warnings"}

dask/dataframe/tests/test_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ def test_api():
2222
for m, mod in member_dict.items()
2323
if m not in DA_EXPORTED_SUBMODULES
2424
if isinstance(mod, ModuleType)
25-
and mod.__package__
26-
and mod.__package__.startswith("dask.dataframe")
25+
and mod.__spec__.parent
26+
and mod.__spec__.parent.startswith("dask.dataframe")
2727
}
2828
# imported utility modules
2929
members -= {"annotations"}

0 commit comments

Comments
 (0)