1
1
import json
2
2
from typing import Union
3
3
4
+ import importlib_metadata
4
5
import pytest
5
- from pkg_resources import get_distribution
6
6
from requests import Session
7
7
8
8
from arango .client import ArangoClient
@@ -21,7 +21,7 @@ def test_client_attributes():
21
21
http_client = DefaultHTTPClient ()
22
22
23
23
client = ArangoClient (hosts = "http://127.0.0.1:8529" , http_client = http_client )
24
- assert client .version == get_distribution ("python-arango" ). version
24
+ assert client .version == importlib_metadata . version ("python-arango" )
25
25
assert client .hosts == ["http://127.0.0.1:8529" ]
26
26
27
27
assert repr (client ) == "<ArangoClient http://127.0.0.1:8529>"
@@ -36,7 +36,7 @@ def test_client_attributes():
36
36
serializer = json .dumps ,
37
37
deserializer = json .loads ,
38
38
)
39
- assert client .version == get_distribution ("python-arango" ). version
39
+ assert client .version == importlib_metadata . version ("python-arango" )
40
40
assert client .hosts == client_hosts
41
41
assert repr (client ) == client_repr
42
42
assert isinstance (client ._host_resolver , RoundRobinHostResolver )
@@ -48,7 +48,7 @@ def test_client_attributes():
48
48
serializer = json .dumps ,
49
49
deserializer = json .loads ,
50
50
)
51
- assert client .version == get_distribution ("python-arango" ). version
51
+ assert client .version == importlib_metadata . version ("python-arango" )
52
52
assert client .hosts == client_hosts
53
53
assert repr (client ) == client_repr
54
54
assert isinstance (client ._host_resolver , RandomHostResolver )
0 commit comments