diff --git a/README.md b/README.md index d3721a9c7..b52752233 100644 --- a/README.md +++ b/README.md @@ -640,7 +640,6 @@ This will be indicated in the output with one of the following suffixes: - [pip-compile-multi](https://pip-compile-multi.readthedocs.io/en/latest/) - pip-compile command wrapper for multiple cross-referencing requirements files. - [pipdeptree](https://github.com/tox-dev/pipdeptree) to print the dependency tree of the installed packages. - `requirements.in`/`requirements.txt` syntax highlighting: - - [requirements.txt.vim](https://github.com/raimon49/requirements.txt.vim) for Vim. - [Python extension for VS Code](https://marketplace.visualstudio.com/items?itemName=ms-python.python) for VS Code. - [pip-requirements.el](https://github.com/Wilfred/pip-requirements.el) for Emacs. diff --git a/piptools/repositories/pypi.py b/piptools/repositories/pypi.py index 5a4448e3f..f585dfc34 100644 --- a/piptools/repositories/pypi.py +++ b/piptools/repositories/pypi.py @@ -447,9 +447,13 @@ def _wheel_support_index_min(self: Wheel, tags: list[Tag]) -> int: Wheel.support_index_min = _wheel_support_index_min self._available_candidates_cache = {} - # If we don't clear this cache then it can contain results from an - # earlier call when allow_all_wheels wasn't active. See GH-1532 - self.finder.find_all_candidates.cache_clear() + # Finder internally caches results, and there is no public method to + # clear the cache, so we re-create the object here. If we don't clear + # this cache then it can contain results from an earlier call when + # allow_all_wheels wasn't active. See GH-1532 + self._finder = self.command._build_package_finder( + options=self.options, session=self.session + ) try: yield