|
17 | 17 | import itertools |
18 | 18 | import os |
19 | 19 | import time |
20 | | -import warnings |
21 | 20 | import weakref |
22 | 21 | from abc import ABC, abstractmethod |
23 | 22 | from concurrent.futures import ThreadPoolExecutor |
@@ -388,32 +387,9 @@ def decorator(manager_cls: type[StorageManager]): |
388 | 387 | @classmethod |
389 | 388 | def create(cls, manager_type: str, controller_info: ZMQServerInfo, config: dict[str, Any]) -> StorageManager: |
390 | 389 | """Create and return a StorageManager instance.""" |
391 | | - if manager_type not in cls._registry: |
392 | | - if manager_type == "AsyncSimpleStorageManager": |
393 | | - warnings.warn( |
394 | | - f"The manager_type {manager_type} will be deprecated in 0.1.7, please use SimpleStorage instead.", |
395 | | - category=DeprecationWarning, |
396 | | - stacklevel=2, |
397 | | - ) |
398 | | - manager_type = "SimpleStorage" |
399 | | - elif manager_type == "MooncakeStorageManager": |
400 | | - warnings.warn( |
401 | | - f"The manager_type {manager_type} will be deprecated in 0.1.7, please use MooncakeStore instead.", |
402 | | - category=DeprecationWarning, |
403 | | - stacklevel=2, |
404 | | - ) |
405 | | - manager_type = "MooncakeStore" |
406 | | - elif manager_type == "YuanrongStorageManager": |
407 | | - warnings.warn( |
408 | | - f"The manager_type {manager_type} will be deprecated in 0.1.7, please use Yuanrong instead.", |
409 | | - category=DeprecationWarning, |
410 | | - stacklevel=2, |
411 | | - ) |
412 | | - manager_type = "Yuanrong" |
413 | | - else: |
414 | | - raise ValueError( |
415 | | - f"Unknown manager_type: {manager_type}. Supported managers include: {list(cls._registry.keys())}" |
416 | | - ) |
| 390 | + assert manager_type in cls._registry, ( |
| 391 | + f"Unknown manager_type: {manager_type}. Supported managers include: {list(cls._registry.keys())}" |
| 392 | + ) |
417 | 393 | return cls._registry[manager_type](controller_info, config) |
418 | 394 |
|
419 | 395 |
|
|
0 commit comments