File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 6
6
import re
7
7
8
8
from packaging .utils import canonicalize_name
9
- from pip ._internal .download import PipSession
9
+ # Between different versions of pip the location of PipSession has changed.
10
+ try :
11
+ from pip ._internal .network .session import PipSession
12
+ except ImportError : # pragma: no cover
13
+ from pip ._internal .download import PipSession
10
14
from pip ._internal .req .req_file import parse_requirements
11
15
12
16
log = logging .getLogger (__name__ )
Original file line number Diff line number Diff line change 6
6
7
7
from packaging .utils import canonicalize_name
8
8
from pip ._internal .commands .show import search_packages_info
9
- from pip ._internal .download import PipSession
9
+ # Between different versions of pip the location of PipSession has changed.
10
+ try :
11
+ from pip ._internal .network .session import PipSession
12
+ except ImportError : # pragma: no cover
13
+ from pip ._internal .download import PipSession
10
14
from pip ._internal .req .req_file import parse_requirements
11
15
from pip ._internal .utils .misc import get_installed_distributions
12
16
You can’t perform that action at this time.
0 commit comments