[
https://issues.apache.org/jira/browse/SPARK-32814?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Maciej Szymkiewicz updated SPARK-32814:
---------------------------------------
Comment: was deleted
(was: https://github.com/apache/spark/pull/29591)
> Metaclasses are broken for a few classes in Python 3
> ----------------------------------------------------
>
> Key: SPARK-32814
> URL: https://issues.apache.org/jira/browse/SPARK-32814
> Project: Spark
> Issue Type: Bug
> Components: ML, PySpark, SQL
> Affects Versions: 2.4.0, 3.0.0, 3.1.0
> Reporter: Maciej Szymkiewicz
> Assignee: Apache Spark
> Priority: Major
>
> As of Python 3 {{__metaclass__}} is no longer supported
> https://www.python.org/dev/peps/pep-3115/.
> However, we have multiple classes which where never migrated to Python 3
> compatible syntax:
> - A number of ML {{Params}}} with {{__metaclass__ = ABCMeta}}
> - Some of the SQL {{types}} with {{__metaclass__ = DataTypeSingleton}}
> As a result some functionalities are broken in Python 3. For example
> {code:python}
> >>> from pyspark.sql.types import BooleanType
> >>>
> >>>
> >>> BooleanType() is BooleanType()
> >>>
> >>>
> False
> {code}
> or
> {code:python}
> >>> import inspect
> >>>
> >>>
> >>> from pyspark.ml import Estimator
> >>>
> >>>
> >>> inspect.isabstract(Estimator)
> >>>
> >>>
> False
> {code}
> where in both cases we expect to see {{True}}.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]