Skip to content

Commit

Permalink
Compatibility changes for Pip 23.1 (#363)
Browse files Browse the repository at this point in the history
* Parity with pip==23.1

* add news fragment
  • Loading branch information
matteius authored Apr 18, 2023
1 parent d0a95fa commit 6874bd8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions news/363.vendor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update ``WheelCache`` usage to be compatible with ``pip==23.1``
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ install_requires =
cached_property
distlib>=0.2.8
pep517>=0.5.0
pip>=22.2
pip>=23.1
platformdirs
plette[validation]
requests
Expand Down
5 changes: 2 additions & 3 deletions src/requirementslib/models/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import attr
import requests
from pip._internal.cache import WheelCache
from pip._internal.models.format_control import FormatControl
from pip._internal.operations.build.build_tracker import get_build_tracker
from pip._internal.req.constructors import install_req_from_line
from pip._internal.req.req_install import InstallRequirement
Expand Down Expand Up @@ -61,7 +60,7 @@
@contextlib.contextmanager
def _get_wheel_cache():
with global_tempdir_manager():
yield WheelCache(CACHE_DIR, FormatControl(set(), set()))
yield WheelCache(CACHE_DIR)


def _get_filtered_versions(ireq, versions, prereleases):
Expand Down Expand Up @@ -446,7 +445,7 @@ def is_python(section):
def get_resolver(
finder, build_tracker, pip_options, session, directory, install_command=None
):
wheel_cache = WheelCache(pip_options.cache_dir, pip_options.format_control)
wheel_cache = WheelCache(pip_options.cache_dir)
if install_command is None:
install_command = get_pip_command()
preparer = install_command.make_requirement_preparer(
Expand Down

0 comments on commit 6874bd8

Please sign in to comment.