Skip to content

Commit

Permalink
update proto file to support bigfloat data type (#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
mangalaman93 authored Nov 28, 2024
1 parent 44d00b2 commit cfa70e0
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 29 deletions.
9 changes: 2 additions & 7 deletions pydgraph/proto/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,7 @@ syntax = "proto3";

package api;

/* import "gogoproto/gogo.proto"; */

/* option (gogoproto.marshaler_all) = true; */
/* option (gogoproto.sizer_all) = true; */
/* option (gogoproto.unmarshaler_all) = true; */
/* option (gogoproto.goproto_getters_all) = true; */
option go_package = "github.com/dgraph-io/dgo/v240/protos/api";

option java_package = "io.dgraph";
option java_outer_classname = "DgraphProto";
Expand Down Expand Up @@ -175,7 +170,7 @@ message Value {
bytes datetime_val = 9;
string password_val = 10;
uint64 uid_val=11;
// number 12 is reserved for bigfloat
bytes bigfloat_val=12;
bytes vfloat32_val=13;
}
}
Expand Down
38 changes: 24 additions & 14 deletions pydgraph/proto/api_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 2 additions & 7 deletions pydgraph/proto/api_pb2_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@

import api_pb2 as api__pb2

GRPC_GENERATED_VERSION = '1.65.1'
GRPC_GENERATED_VERSION = '1.68.0'
GRPC_VERSION = grpc.__version__
EXPECTED_ERROR_RELEASE = '1.66.0'
SCHEDULED_RELEASE_DATE = 'August 6, 2024'
_version_not_supported = False

try:
Expand All @@ -18,15 +16,12 @@
_version_not_supported = True

if _version_not_supported:
warnings.warn(
raise RuntimeError(
f'The grpc package installed is at version {GRPC_VERSION},'
+ f' but the generated code in api_pb2_grpc.py depends on'
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
+ f' This warning will become an error in {EXPECTED_ERROR_RELEASE},'
+ f' scheduled for release on {SCHEDULED_RELEASE_DATE}.',
RuntimeWarning
)


Expand Down
2 changes: 1 addition & 1 deletion tests/test_txn.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def test_best_effort_txn(self):
self.assertEqual([], json.loads(resp.json).get('me'))

while True:
txn = self.client.txn(read_only=True, best_effort=True)
txn = self.client.txn(read_only=True)
resp = txn.query(query)
if resp.txn.start_ts < mu_ts:
continue
Expand Down

0 comments on commit cfa70e0

Please sign in to comment.