Skip to content

Commit f810636

Browse files
committed
fix: Remove package dependency litestar
1 parent 6eeb3f7 commit f810636

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

flaxkv/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
from .core import LevelDBDict, LMDBDict, RemoteDBDict
2121

22-
__version__ = "0.2.7"
22+
__version__ = "0.2.7.1"
2323

2424
__all__ = [
2525
"FlaxKV",

flaxkv/manager.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import time
2424
import traceback
2525
from pathlib import Path
26+
from typing import Dict
2627
from uuid import uuid4
2728

2829
import msgspec
@@ -32,6 +33,12 @@
3233
from .pack import decode, decode_key, encode
3334

3435

36+
class StructUpdateData(msgspec.Struct):
37+
type: str
38+
data: Dict[bytes, bytes]
39+
time: float
40+
41+
3542
class DBManager:
3643
def __init__(
3744
self, db_type: str, root_path_or_url: str, db_name: str, rebuild=False, **kwargs
@@ -238,7 +245,6 @@ def __init__(
238245
backoff=2,
239246
)
240247
def attach_db(self, event: threading.Event):
241-
from .serve.interface import StructUpdateData
242248

243249
with self.client.stream(
244250
"POST",

flaxkv/serve/interface.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,3 @@ class StructDeleteBatchData(msgspec.Struct):
5555
keys: List[bytes]
5656
client_id: str
5757
time: float
58-
59-
60-
class StructUpdateData(msgspec.Struct):
61-
type: str
62-
data: Dict[bytes, bytes]
63-
time: float

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ test = [
5050
"pytest",
5151
"pytest-aiohttp",
5252
"uvicorn",
53-
"httpx",
53+
"httpx[http2]",
5454
"pandas",
5555
"hypercorn",
5656
"uvloop; sys_platform == 'linux'",
@@ -61,11 +61,11 @@ server = [
6161
"hypercorn",
6262
"uvloop; sys_platform == 'linux'",
6363
"litestar>=2.5.0",
64-
"httpx",
64+
"httpx[http2]",
6565
]
6666

6767
client = [
68-
"httpx",
68+
"httpx[http2]",
6969
]
7070

7171

0 commit comments

Comments
 (0)