Skip to content

Commit 88f76ae

Browse files
committed
more
Signed-off-by: ji-huazhong <hzji210@gmail.com>
1 parent 5124c05 commit 88f76ae

2 files changed

Lines changed: 3 additions & 28 deletions

File tree

recipe/simple_use_case/single_controller_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
import argparse
1717
import asyncio
18-
import logging
1918
import os
2019
import random
2120
import time

transfer_queue/storage/managers/base.py

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import itertools
1818
import os
1919
import time
20-
import warnings
2120
import weakref
2221
from abc import ABC, abstractmethod
2322
from concurrent.futures import ThreadPoolExecutor
@@ -388,32 +387,9 @@ def decorator(manager_cls: type[StorageManager]):
388387
@classmethod
389388
def create(cls, manager_type: str, controller_info: ZMQServerInfo, config: dict[str, Any]) -> StorageManager:
390389
"""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+
)
417393
return cls._registry[manager_type](controller_info, config)
418394

419395

0 commit comments

Comments
 (0)