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

[test] Replace make_temp_file with tempfile #4111

Merged
merged 3 commits into from
Jan 25, 2022

Conversation

ailzhang
Copy link
Contributor

@ailzhang ailzhang commented Jan 25, 2022

Related: #3782

`make_temp_file` can be easily replaced by native python tempfile so
let's just use tempfile.

[ghstack-poisoned]
@vercel
Copy link

vercel bot commented Jan 25, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/taichi-api-docs-preview/taichi/4kLCib2iZbjb9GmujmgDtorFCHbA
✅ Preview: https://taichi-git-gh-ailzhang57head-taichi-api-docs-preview.vercel.app

Related: #3782

`make_temp_file` can be easily replaced by native python tempfile so
let's just use tempfile.

[ghstack-poisoned]
Copy link
Member

@k-ye k-ye left a comment

Choose a reason for hiding this comment

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

LGTM!

Related: #3782

`make_temp_file` can be easily replaced by native python tempfile so
let's just use tempfile.

[ghstack-poisoned]
@ailzhang ailzhang merged commit ba9f586 into gh/ailzhang/57/base Jan 25, 2022
ailzhang pushed a commit that referenced this pull request Jan 25, 2022
Related: #3782

Originally I want to delete make_temp_file and use tempfile directly.
But on windows ti.imwrite will error on a file with an open handle. So
we do need a helper function to handle the process of open -> close temp file
just to get a name.

ghstack-source-id: 14eb26d13c11e607c76420f69e0c66f68eb7ef56
Pull Request resolved: #4111
@ailzhang ailzhang deleted the gh/ailzhang/57/head branch January 25, 2022 12:57
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