Skip to content

Commit

Permalink
Remove import of cached_property from pip
Browse files Browse the repository at this point in the history
And also remove hack to make it available for python3.7.

Pipenv does not support py37 for quite a while now.
  • Loading branch information
oz123 committed Sep 13, 2024
1 parent c60e345 commit a397c38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
6 changes: 1 addition & 5 deletions pipenv/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@
import logging
import os
import sys

try:
from functools import cached_property
except ImportError:
cached_property = property
from functools import cached_property


def _ensure_modules():
Expand Down
9 changes: 1 addition & 8 deletions pipenv/utils/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import sys
import tempfile
import warnings
from functools import lru_cache
from functools import cached_property, lru_cache
from pathlib import Path
from typing import Dict, List, Optional

Expand All @@ -31,13 +31,6 @@
from pipenv.utils.requirements import normalize_name
from pipenv.vendor import click

try:
# this is only in Python3.8 and later
from functools import cached_property
except ImportError:
# eventually distlib will remove cached property when they drop Python3.7
from pipenv.patched.pip._vendor.distlib.util import cached_property

from .dependencies import (
HackedPythonVersion,
convert_deps_to_pip,
Expand Down

0 comments on commit a397c38

Please sign in to comment.