Skip to content

Commit a397c38

Browse files
committed
Remove import of cached_property from pip
And also remove hack to make it available for python3.7. Pipenv does not support py37 for quite a while now.
1 parent c60e345 commit a397c38

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

pipenv/resolver.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@
33
import logging
44
import os
55
import sys
6-
7-
try:
8-
from functools import cached_property
9-
except ImportError:
10-
cached_property = property
6+
from functools import cached_property
117

128

139
def _ensure_modules():

pipenv/utils/resolver.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import sys
66
import tempfile
77
import warnings
8-
from functools import lru_cache
8+
from functools import cached_property, lru_cache
99
from pathlib import Path
1010
from typing import Dict, List, Optional
1111

@@ -31,13 +31,6 @@
3131
from pipenv.utils.requirements import normalize_name
3232
from pipenv.vendor import click
3333

34-
try:
35-
# this is only in Python3.8 and later
36-
from functools import cached_property
37-
except ImportError:
38-
# eventually distlib will remove cached property when they drop Python3.7
39-
from pipenv.patched.pip._vendor.distlib.util import cached_property
40-
4134
from .dependencies import (
4235
HackedPythonVersion,
4336
convert_deps_to_pip,

0 commit comments

Comments
 (0)