File tree Expand file tree Collapse file tree 2 files changed +21
-12
lines changed Expand file tree Collapse file tree 2 files changed +21
-12
lines changed Original file line number Diff line number Diff line change 10
10
protobuf_version = Version (google .protobuf .__version__ )
11
11
12
12
# for compatible with arcadia
13
- if _utilities .check_module_exists ("ydb.public.api" ):
14
- from ydb .public .api .grpc import * # noqa
13
+ if _utilities .check_module_exists ("contrib. ydb.public.api" ):
14
+ from contrib . ydb .public .api .grpc import * # noqa
15
15
16
- sys .modules ["ydb._grpc.common" ] = sys .modules ["ydb.public.api.grpc" ]
16
+ sys .modules ["ydb._grpc.common" ] = sys .modules ["contrib. ydb.public.api.grpc" ]
17
17
18
- from ydb .public .api import protos
18
+ from contrib . ydb .public .api import protos
19
19
20
- sys .modules ["ydb._grpc.common.protos" ] = sys .modules ["ydb.public.api.protos" ]
20
+ sys .modules ["ydb._grpc.common.protos" ] = sys .modules ["contrib. ydb.public.api.protos" ]
21
21
else :
22
22
# common way, outside of arcadia
23
23
if protobuf_version < Version ("4.0" ):
Original file line number Diff line number Diff line change 11
11
ydb_dynamic_config_pb2 ,
12
12
)
13
13
else :
14
- from .._grpc .common .draft import (
15
- ydb_dynamic_config_v1_pb2_grpc ,
16
- )
17
-
18
- from .._grpc .common .draft .protos import (
19
- ydb_dynamic_config_pb2 ,
20
- )
14
+ try :
15
+ from .._grpc .common .draft import (
16
+ ydb_dynamic_config_v1_pb2_grpc ,
17
+ )
18
+
19
+ from .._grpc .common .draft .protos import (
20
+ ydb_dynamic_config_pb2 ,
21
+ )
22
+ except ImportError :
23
+ from .._grpc .common .draft import (
24
+ ydb_dynamic_config_v1_pb2_grpc ,
25
+ )
26
+
27
+ from .._grpc .common .protos .draft import (
28
+ ydb_dynamic_config_pb2 ,
29
+ )
21
30
22
31
23
32
ydb_dynamic_config = ydb_dynamic_config_pb2
You can’t perform that action at this time.
0 commit comments