Commit 8587a05 1 parent 1e23940 commit 8587a05 Copy full SHA for 8587a05
File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
"""datajudge allows to assess whether data from database complies with reference
2
2
information."""
3
3
4
- import pkg_resources
4
+ import importlib . metadata
5
5
6
6
from .constraints .base import Constraint
7
7
from .db_access import Condition
16
16
]
17
17
18
18
try :
19
- __version__ = pkg_resources . get_distribution (__name__ ).version
19
+ __version__ = importlib . metadata . distribution (__name__ ).version
20
20
except Exception :
21
21
__version__ = "1.8.0"
Original file line number Diff line number Diff line change 1
1
from typing import Iterable
2
2
3
3
import pytest
4
- from pkg_resources import parse_version
4
+ from packaging . version import Version
5
5
6
6
from .constraints .base import Constraint
7
7
from .db_access import apply_patches
@@ -22,7 +22,7 @@ def get_formatter(pytestconfig):
22
22
try :
23
23
import pytest_html
24
24
25
- if parse_version (pytest_html .__version__ ).major >= 4 :
25
+ if Version (pytest_html .__version__ ).major >= 4 :
26
26
return AnsiColorFormatter ()
27
27
finally :
28
28
return Formatter ()
You can’t perform that action at this time.
0 commit comments