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 <william@trailofbits.com>

* _virtual_env: add TODO

Signed-off-by: William Woodruff <william@trailofbits.com>

* CHANGELOG: record changes

Signed-off-by: William Woodruff <william@trailofbits.com>

Signed-off-by: William Woodruff <william@trailofbits.com>
  • Loading branch information
timothy-bartlett authored Dec 29, 2022
1 parent d15d421 commit 2a31bb4
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 2a31bb4

Please sign in to comment.