Skip to content

Commit

Permalink
Include setuptools in upgrade set (#454)
Browse files Browse the repository at this point in the history
* _virtual_env: ensure setuptools is up-to-date

Signed-off-by: William Woodruff <[email protected]>

* _virtual_env: add TODO

Signed-off-by: William Woodruff <[email protected]>

* CHANGELOG: record changes

Signed-off-by: William Woodruff <[email protected]>

Signed-off-by: William Woodruff <[email protected]>
  • Loading branch information
woodruffw authored Dec 29, 2022
1 parent dddcf24 commit 73855b1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ All versions prior to 0.0.9 are untracked.

## [Unreleased]

### Fixed

* Fixed `pip-audit`'s virtual environment creation and upgrade behavior,
preventing spurious vulnerability reports
([#454](https://github.com/pypa/pip-audit/pull/454))

## [2.4.11]

### Fixed
Expand Down
3 changes: 3 additions & 0 deletions pip_audit/_virtual_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ def post_setup(self, context: SimpleNamespace) -> None:

# Firstly, upgrade our `pip` versions since `ensurepip` can leave us with an old version
# and install `wheel` in case our package dependencies are offered as wheels
# TODO: This is probably replaceable with the `upgrade_deps` option on `EnvBuilder`
# itself, starting with Python 3.9.
pip_upgrade_cmd = [
context.env_exe,
"-m",
Expand All @@ -86,6 +88,7 @@ def post_setup(self, context: SimpleNamespace) -> None:
"--upgrade",
"pip",
"wheel",
"setuptools",
]
try:
run(pip_upgrade_cmd, state=self._state)
Expand Down

0 comments on commit 73855b1

Please sign in to comment.