Skip to content

Commit

Permalink
Remove quasiPipTempDirectory and use Pips TempDirectory.
Browse files Browse the repository at this point in the history
  • Loading branch information
matteius committed Nov 23, 2022
1 parent 5db5472 commit 0309e7f
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions pipenv/utils/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,6 @@
err = rich.console.Console(stderr=True)


class QuasiPipTempDirectory:
"""A fake pip temp directory that is only used to pass path.
We add this because we can't monkeypatch a string instance.
"""

def __init__(self, path):
self.path = path


def get_package_finder(
install_cmd=None,
options=None,
Expand Down Expand Up @@ -660,16 +650,14 @@ def constraints(self):

@contextlib.contextmanager
def get_resolver(self, clear=False):
from tempfile import TemporaryDirectory
from pipenv.patched.pip._internal.utils.temp_dir import TempDirectory

with global_tempdir_manager(), get_build_tracker() as build_tracker, TemporaryDirectory(
suffix="-build", prefix="pipenv-"
) as directory:
with global_tempdir_manager(), get_build_tracker() as build_tracker, TempDirectory() as directory:
pip_options = self.pip_options
finder = self.finder
wheel_cache = WheelCache(pip_options.cache_dir, pip_options.format_control)
preparer = self.pip_command.make_requirement_preparer(
temp_build_dir=QuasiPipTempDirectory(path=directory),
temp_build_dir=directory,
options=pip_options,
build_tracker=build_tracker,
session=self.session,
Expand Down

0 comments on commit 0309e7f

Please sign in to comment.