Skip to content

replaced deprecated tempfile.mktemp with mkstemp - #690

Open
AgarwalNilay wants to merge 1 commit into
gallantlab:mainfrom
evi-hendrikx:fix/mni-mktemp-deprecated
Open

replaced deprecated tempfile.mktemp with mkstemp#690
AgarwalNilay wants to merge 1 commit into
gallantlab:mainfrom
evi-hendrikx:fix/mni-mktemp-deprecated

Conversation

@AgarwalNilay

Copy link
Copy Markdown
Contributor

tempfile.mktemp() is deprecated (docs recommend mkstemp()) because it only returns a filename without creating the file, leaving a race window before the caller creates it. Switch all temp-path creation in this module to mkstemp(), closing the returned fd immediately since callers only need the path (flirt/nibabel write to it externally).

tempfile.mktemp() is deprecated (docs recommend mkstemp()) because
it only returns a filename without creating the file, leaving a race
window before the caller creates it. Switch all temp-path creation in
this module to mkstemp(), closing the returned fd immediately since
callers only need the path (flirt/nibabel write to it externally).
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.

1 participant