You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/03/09 22:02:02 UTC

[GitHub] [spark] itholic commented on a change in pull request #35775: [SPARK-38355][PYTHON][TESTS] Use `mkstemp` instead of `mktemp`

itholic commented on a change in pull request #35775:
URL: https://github.com/apache/spark/pull/35775#discussion_r823128671



##########
File path: python/pyspark/testing/pandasutils.py
##########
@@ -259,7 +259,7 @@ def temp_dir(self):
     @contextmanager
     def temp_file(self):
         with self.temp_dir() as tmp:
-            yield tempfile.mktemp(dir=tmp)
+            yield tempfile.mkstemp(dir=tmp)[1]

Review comment:
       qq: Does `mkstemp` always guarantees returning the fd, name pair?? Maybe don't we need to check the length or something to make sure `mkstemp` returning the proper value ?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org