diff --git a/CHANGELOG.md b/CHANGELOG.md index 2cc5c4bf8a..32b70e3d4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed ### Fixed +* Removed stale `select_host_device` and `has_host_device` names from `dpctl.__all__`, which made `from dpctl import *` fail with `AttributeError` [gh-2410](https://github.com/IntelPython/dpctl/pull/2410) ### Maintenance diff --git a/dpctl/__init__.py b/dpctl/__init__.py index 11c4a3281f..8e59a60fcd 100644 --- a/dpctl/__init__.py +++ b/dpctl/__init__.py @@ -88,13 +88,11 @@ "select_cpu_device", "select_default_device", "select_gpu_device", - "select_host_device", "select_device_with_aspects", "get_num_devices", "has_cpu_devices", "has_gpu_devices", "has_accelerator_devices", - "has_host_device", "get_composite_devices", ] __all__ += [ diff --git a/dpctl/tests/test_service.py b/dpctl/tests/test_service.py index b5b4fe23e9..224aed326e 100644 --- a/dpctl/tests/test_service.py +++ b/dpctl/tests/test_service.py @@ -123,6 +123,12 @@ def test___version__(): assert re.match(reg_expr, dpctl_ver) is not None +def test_star_import(): + ns = {} + exec("from dpctl import *", ns) + assert all(name in ns for name in dpctl.__all__) + + def test_dev_utils(): import tempfile