Skip to content

Commit

Permalink
Convert usage of deprecated ipaddr to standard ipaddress Python library.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 698801471
Change-Id: I033c29cb7dfae196ffb3c9badcb2b7cae01715dd
  • Loading branch information
Tsunami Team authored and copybara-github committed Nov 21, 2024
1 parent 7ef1c0f commit 08be617
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugin_server/py/plugin_service_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
# limitations under the License.
"""Tests for plugin_service."""

import ipaddress
import time

from absl.testing import absltest
import grpc_testing
import ipaddr

from google3.google.protobuf import timestamp_pb2
import plugin_service
Expand Down Expand Up @@ -140,7 +140,7 @@ def _build_network_endpoint(ip: str, port: int) -> _NetworkEndpoint:


def _get_address_family(ip: str) -> _AddressFamily:
inet_addr = ipaddr.IPAddress(ip)
inet_addr = ipaddress.ip_address(ip)
if inet_addr.version == 4:
return _AddressFamily.IPV4
elif inet_addr.version == 6:
Expand Down

0 comments on commit 08be617

Please sign in to comment.