Skip to content

Commit c349507

Browse files
authored
Merge pull request #2410 from IntelPython/fix-stale-host-device-all
Remove stale host device names from `dpctl.__all__`
2 parents 2dfa6bb + 93cf24a commit c349507

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515
### Removed
1616

1717
### Fixed
18+
* 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)
1819

1920
### Maintenance
2021

‎dpctl/__init__.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,11 @@
8888
"select_cpu_device",
8989
"select_default_device",
9090
"select_gpu_device",
91-
"select_host_device",
9291
"select_device_with_aspects",
9392
"get_num_devices",
9493
"has_cpu_devices",
9594
"has_gpu_devices",
9695
"has_accelerator_devices",
97-
"has_host_device",
9896
"get_composite_devices",
9997
]
10098
__all__ += [

‎dpctl/tests/test_service.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ def test___version__():
123123
assert re.match(reg_expr, dpctl_ver) is not None
124124

125125

126+
def test_star_import():
127+
ns = {}
128+
exec("from dpctl import *", ns)
129+
assert all(name in ns for name in dpctl.__all__)
130+
131+
126132
def test_dev_utils():
127133
import tempfile
128134

0 commit comments

Comments
 (0)