Skip to content

Commit

Permalink
Address major performance issue with recreating requests sessions ove…
Browse files Browse the repository at this point in the history
…r and over
  • Loading branch information
matteius committed Oct 24, 2024
1 parent 870226d commit 1f8cee7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion pipenv/routines/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,6 @@ def do_init(
pypi_mirror=pypi_mirror,
categories=categories,
)
err.print(packages_updated)

if not allow_global and not deploy and "PIPENV_ACTIVE" not in os.environ:
console.print(
Expand Down
4 changes: 2 additions & 2 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 Down Expand Up @@ -308,7 +308,7 @@ def pip_options(self):
)
return pip_options

@property
@cached_property
def session(self):
return self.pip_command._build_session(self.pip_options)

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ def test_lock_package_with_compatible_release_specifier(pipenv_instance_private_
@pytest.mark.install
def test_default_lock_overwrite_dev_lock(pipenv_instance_pypi):
with pipenv_instance_pypi() as p:
c = p.pipenv("install 'click==6.7'")
c = p.pipenv("install click==6.7")
assert c.returncode == 0
c = p.pipenv("install -d flask")
assert c.returncode == 0
Expand Down

0 comments on commit 1f8cee7

Please sign in to comment.