-
Notifications
You must be signed in to change notification settings - Fork 65
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
Conversation
There was a problem hiding this 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!
sorry about that, hastely comitted without running pylint. |
There was a problem hiding this 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!
Signed-off-by: William Woodruff <[email protected]>
This is included in 2.6.1, which is in the process of being released now. Thanks again! |
This PR fixes pip-audit on Windows machines by providing a work around for
NamedTempFile
. This workaround is implemented in the_util.py
file asCustomNamedTempFile
.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.