Skip to content

Commit b1018a8

Browse files
committed
Address major performance issue with recreating requests sessions over and over
1 parent 16c1346 commit b1018a8

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

pipenv/routines/install.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,6 @@ def do_init(
701701
pypi_mirror=pypi_mirror,
702702
categories=categories,
703703
)
704-
err.print(packages_updated)
705704

706705
if not allow_global and not deploy and "PIPENV_ACTIVE" not in os.environ:
707706
console.print(

pipenv/utils/resolver.py

Lines changed: 2 additions & 2 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

@@ -308,7 +308,7 @@ def pip_options(self):
308308
)
309309
return pip_options
310310

311-
@property
311+
@cached_property
312312
def session(self):
313313
return self.pip_command._build_session(self.pip_options)
314314

tests/integration/test_lock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ def test_lock_package_with_compatible_release_specifier(pipenv_instance_private_
588588
@pytest.mark.install
589589
def test_default_lock_overwrite_dev_lock(pipenv_instance_pypi):
590590
with pipenv_instance_pypi() as p:
591-
c = p.pipenv("install 'click==6.7'")
591+
c = p.pipenv("install click==6.7")
592592
assert c.returncode == 0
593593
c = p.pipenv("install -d flask")
594594
assert c.returncode == 0

0 commit comments

Comments
 (0)