Skip to content

Commit

Permalink
last pkg_resources
Browse files Browse the repository at this point in the history
Signed-off-by: Danny C <d.chiao@gmail.com>
  • Loading branch information
adchia committed Sep 7, 2023
1 parent 3a40c07 commit 9af1cad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sdk/python/feast/proto_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def from_json_object_updated(

# https://github.com/feast-dev/feast/issues/2484 Certain feast users need a higher version of protobuf but the
# parameters of `from_json_object` changes in feast 3.20.1. This change gives users flexibility to use earlier versions.
current_version = importlib.resources.get_distribution("protobuf").version
current_version = importlib_version("protobuf")
if version.parse(current_version) < version.parse("3.20"):
_patch_proto_json_encoding(Value, to_json_object, from_json_object)
else:
Expand Down Expand Up @@ -221,7 +221,7 @@ def from_json_object_updated(

# https://github.com/feast-dev/feast/issues/2484 Certain feast users need a higher version of protobuf but the
# parameters of `from_json_object` changes in feast 3.20.1. This change gives users flexibility to use earlier versions.
current_version = pkg_resources.get_distribution("protobuf").version
current_version = importlib_version("protobuf")
if version.parse(current_version) < version.parse("3.20"):
_patch_proto_json_encoding(FeatureList, to_json_object, from_json_object)
else:
Expand Down

0 comments on commit 9af1cad

Please sign in to comment.