[ https://issues.apache.org/jira/browse/SPARK-38355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17501958#comment-17501958 ]
Bjørn Jørgensen commented on SPARK-38355: ----------------------------------------- Well I did guess that this one was an easy one. But mkstemp returns a tuple. So I get TypeError: expected str, bytes or os.PathLike object, not tuple And NamedTemporaryFile gives TypeError: expected str, bytes or os.PathLike object, not _TemporaryFileWrapper. And I can't figure out what and _TemporaryFileWrapper is. So I have tried a lot of different things as you can see in https://github.com/bjornjorgensen/spark/commits/Change-mktemp-to-mkstemp Right now I get AttributeError: __enter__ https://stackoverflow.com/questions/51427729/python-error-attributeerror-enter I don't see the right solution for this problem, so I won`t open a PR for this now. > Change mktemp() to mkstemp() > ---------------------------- > > Key: SPARK-38355 > URL: https://issues.apache.org/jira/browse/SPARK-38355 > Project: Spark > Issue Type: Bug > Components: PySpark > Affects Versions: 3.3.0 > Reporter: Bjørn Jørgensen > Priority: Major > > In the file pandasutils.py on line 262 yield tempfile.mktemp(dir=tmp) > The mktemp() is [deprecated and is not > secure|https://docs.python.org/3/library/tempfile.html#deprecated-functions-and-variables] -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org