Skip to content

Commit 821b6ef

Browse files
committed
Avoid pkg_resources import at the top-level.
1 parent 67dd10d commit 821b6ef

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

changelog/4768.trivial.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Avoid pkg_resources import at the top-level.

src/_pytest/config/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
import py
1616
import six
17-
from pkg_resources import parse_version
1817
from pluggy import HookimplMarker
1918
from pluggy import HookspecMarker
2019
from pluggy import PluginManager
@@ -815,6 +814,7 @@ def _preparse(self, args, addopts=True):
815814

816815
def _checkversion(self):
817816
import pytest
817+
from pkg_resources import parse_version
818818

819819
minver = self.inicfg.get("minversion", None)
820820
if minver:

0 commit comments

Comments
 (0)