You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (Jira)" <ji...@apache.org> on 2026/03/17 22:46:00 UTC

[jira] [Resolved] (SPARK-52785) Migrate from legacy super(Class, cls) to super() globally (for python 3)

     [ https://issues.apache.org/jira/browse/SPARK-52785?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hyukjin Kwon resolved SPARK-52785.
----------------------------------
    Fix Version/s: 4.2.0
       Resolution: Fixed

Issue resolved by pull request 54790
[https://github.com/apache/spark/pull/54790]

> Migrate from legacy super(Class, cls) to super() globally (for python 3)
> ------------------------------------------------------------------------
>
>                 Key: SPARK-52785
>                 URL: https://issues.apache.org/jira/browse/SPARK-52785
>             Project: Spark
>          Issue Type: Improvement
>          Components: PySpark
>    Affects Versions: 4.0.0
>            Reporter: kyungjunlee
>            Assignee: kyungjunlee
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 4.2.0
>
>
> Apache Spark has dropped support for Python 2 and now requires Python 3. However, some parts of the codebase still use the legacy `super(Class, cls)` syntax, which was originally used for compatibility with Python 2.
> ```
>     super(MyClass, cls).setUpClass()
> ```
> This can now be simplified to the modern Python 3 style:
> ```    
>     super().setUpClass()
> ```
> This change has no functional impact, but it helps improve readability and modernize the codebase.
> I would like to work on replacing these legacy patterns throughout the codebase as my first contribution to Apache Spark.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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