Skip to content

Commit ae98864

Browse files
committed
relocate v2
1 parent a1225c2 commit ae98864

File tree

4 files changed

+16
-13
lines changed

4 files changed

+16
-13
lines changed

src/etcetra/types.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,3 @@ class EtcdLockOption:
189189
lock_name: str
190190
timeout: Optional[float]
191191
ttl: Optional[int]
192-
193-
194-
@dataclass
195-
class EtcdLockOptionV2:
196-
lock_name: bytes
197-
timeout: Optional[float]
198-
ttl: Optional[int]

src/etcetra/v2/__init__.py

Whitespace-only changes.

src/etcetra/client_v2.py renamed to src/etcetra/v2/client.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,17 @@
2020
import grpc
2121
from grpc.aio import Channel
2222

23-
from .errors import grpc_exception_handler, match_grpc_error
24-
from .grpc_api import rpc_pb2, rpc_pb2_grpc
25-
from .grpc_api import v3lock_pb2, v3lock_pb2_grpc
26-
from .types import (
27-
DeleteRangeRequestType, EtcdCredential, EtcdLockOptionV2 as EtcdLockOption, HostPortPair,
23+
from ..errors import grpc_exception_handler, match_grpc_error
24+
from ..grpc_api import rpc_pb2, rpc_pb2_grpc
25+
from ..grpc_api import v3lock_pb2, v3lock_pb2_grpc
26+
from ..types import (
27+
DeleteRangeRequestType, EtcdCredential, HostPortPair,
2828
PutRequestType, RangeRequestSortOrder, RangeRequestSortTarget, RangeRequestType,
2929
TransactionRequest, TxnReturnType, TxnReturnValues, WatchCreateRequestFilterType,
3030
WatchEvent, WatchEventType,
3131
)
32-
from .client import (
32+
from .types import EtcdLockOption
33+
from ..client import (
3334
EtcdAuthUnaryUnaryInterceptor,
3435
EtcdAuthUnaryStreamInterceptor,
3536
EtcdAuthStreamUnaryInterceptor,

src/etcetra/v2/types.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from typing import Optional
2+
from dataclasses import dataclass
3+
4+
5+
@dataclass
6+
class EtcdLockOption:
7+
lock_name: bytes
8+
timeout: Optional[float]
9+
ttl: Optional[int]

0 commit comments

Comments
 (0)