Skip to content

Commit 2f11a85

Browse files
committed
Import pkg_resources only when necessary.
1 parent d99ceb1 commit 2f11a85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

_pytest/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import types
66
import warnings
77

8-
import pkg_resources
98
import py
109
# DON't import pytest here because it causes import cycle troubles
1110
import sys, os
@@ -942,6 +941,7 @@ def _consider_importhook(self, args, entrypoint_name):
942941
and find all the installed plugins to mark them for re-writing
943942
by the importhook.
944943
"""
944+
import pkg_resources
945945
ns, unknown_args = self._parser.parse_known_and_unknown_args(args)
946946
mode = ns.assertmode
947947
if mode == 'rewrite':

0 commit comments

Comments
 (0)