You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Benjamin Peterson (JIRA)" <ji...@apache.org> on 2018/02/27 03:37:00 UTC
[jira] [Updated] (SPARK-23522) pyspark should always use sys.exit
rather than exit
[ https://issues.apache.org/jira/browse/SPARK-23522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benjamin Peterson updated SPARK-23522:
--------------------------------------
Description:
pyspark uses the builtin exit() function a lot. In certain Python environments exit is not is not defined as a builtin. E.g.,
{code}
$ python -c "exit(4)"
$ python -S -c "exit(4)"
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'exit' is not defined
{code}
exit() as a builtin is really only intended for interactive use. Real code should always use sys.exit.
was:
pyspark uses the builtin exit() function a lot. In certain Python environments exit is not is not defined as a builtin. E.g.,
{code:shell}
$ python -c "exit(4)"
$ python -S -c "exit(4)"
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'exit' is not defined
{code}
exit() as a builtin is really only intended for interactive use. Real code should always use sys.exit.
> pyspark should always use sys.exit rather than exit
> ---------------------------------------------------
>
> Key: SPARK-23522
> URL: https://issues.apache.org/jira/browse/SPARK-23522
> Project: Spark
> Issue Type: Bug
> Components: PySpark
> Affects Versions: 2.2.1
> Reporter: Benjamin Peterson
> Priority: Major
>
> pyspark uses the builtin exit() function a lot. In certain Python environments exit is not is not defined as a builtin. E.g.,
> {code}
> $ python -c "exit(4)"
> $ python -S -c "exit(4)"
> Traceback (most recent call last):
> File "<string>", line 1, in <module>
> NameError: name 'exit' is not defined
> {code}
> exit() as a builtin is really only intended for interactive use. Real code should always use sys.exit.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org