Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tempfiles on windows, fixes #646 #647

Merged
merged 8 commits into from
Jul 24, 2023
Merged

Conversation

marickmanrho
Copy link
Contributor

This PR fixes pip-audit on Windows machines by providing a work around for NamedTempFile. This workaround is implemented in the _util.py file as CustomNamedTempFile.

The CustomNamedTempFile creates a temporary file as expected but allows the file to be open and closed multiple times. CustomNamedTempFile also works as a contextmanager and closes+removes the file when exiting the context.

Copy link
Member

@woodruffw woodruffw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay here; a couple of thoughts!

@marickmanrho
Copy link
Contributor Author

sorry about that, hastely comitted without running pylint.

Copy link
Member

@woodruffw woodruffw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you @marickmanrho!

@woodruffw woodruffw enabled auto-merge (squash) July 24, 2023 17:29
@woodruffw woodruffw merged commit 4485d24 into pypa:main Jul 24, 2023
@woodruffw
Copy link
Member

This is included in 2.6.1, which is in the process of being released now. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants