Skip to content

Commit af69264

Browse files
committed
refactor: Replace pkg_resources with importlib.metadata
1 parent 8ae621c commit af69264

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_plugin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from os import path
22

3-
import pkg_resources
3+
from importlib.metadata import distribution
44
import pytest
55

66
import datajoint.errors as djerr
@@ -10,8 +10,8 @@
1010
@pytest.mark.skip(reason="marked for deprecation")
1111
def test_check_pubkey():
1212
base_name = "datajoint"
13-
base_meta = pkg_resources.get_distribution(base_name)
14-
pubkey_meta = base_meta.get_metadata("{}.pub".format(base_name))
13+
base_dist = distribution(base_name)
14+
pubkey_meta = base_dist.read_text("{}.pub".format(base_name))
1515

1616
with open(
1717
path.join(path.abspath(path.dirname(__file__)), "..", "datajoint.pub"), "r"

0 commit comments

Comments
 (0)