Skip to content

Commit

Permalink
Merge pull request #503 from ydb-platform/fix_arcadia_compatibility
Browse files Browse the repository at this point in the history
fix arcadia compatibility
  • Loading branch information
vgvoleg authored Oct 9, 2024
2 parents 42140da + 4d6ce5c commit e65ff6a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
10 changes: 9 additions & 1 deletion ydb/_grpc/common/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@
protobuf_version = Version(google.protobuf.__version__)

# for compatible with arcadia
if _utilities.check_module_exists("ydb.public.api"):
if _utilities.check_module_exists("contrib.ydb.public.api"):
from contrib.ydb.public.api.grpc import * # noqa

sys.modules["ydb._grpc.common"] = sys.modules["contrib.ydb.public.api.grpc"]

from contrib.ydb.public.api import protos

sys.modules["ydb._grpc.common.protos"] = sys.modules["contrib.ydb.public.api.protos"]
elif _utilities.check_module_exists("ydb.public.api"):
from ydb.public.api.grpc import * # noqa

sys.modules["ydb._grpc.common"] = sys.modules["ydb.public.api.grpc"]
Expand Down
11 changes: 8 additions & 3 deletions ydb/draft/_apis.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,14 @@
ydb_dynamic_config_v1_pb2_grpc,
)

from .._grpc.common.draft.protos import (
ydb_dynamic_config_pb2,
)
try:
from .._grpc.common.draft.protos import (
ydb_dynamic_config_pb2,
)
except ImportError:
from .._grpc.common.protos.draft import (
ydb_dynamic_config_pb2,
)


ydb_dynamic_config = ydb_dynamic_config_pb2
Expand Down

0 comments on commit e65ff6a

Please sign in to comment.