You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by gu...@apache.org on 2026/03/17 22:45:51 UTC
(spark) branch master updated: [SPARK-52785][PYTHON] Simplifying super() syntax in PySpark
This is an automated email from the ASF dual-hosted git repository.
gurwls223 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new d8bc686b4396 [SPARK-52785][PYTHON] Simplifying super() syntax in PySpark
d8bc686b4396 is described below
commit d8bc686b439647bcd6caa483abc0e4a7fc5bd33e
Author: Simola Nayak <si...@classranked.com>
AuthorDate: Wed Mar 18 07:45:39 2026 +0900
[SPARK-52785][PYTHON] Simplifying super() syntax in PySpark
### What changes were proposed in this pull request?
2 instances of super(Class, cls) syntax removed and simplified to super()
These are present in the files:
- _globals.py
- sql/connect/plan.py
### Why are the changes needed?
[Issue SPARK-52785](https://issues.apache.org/jira/browse/SPARK-52785)
Remove Python 2 support
### Does this PR introduce _any_ user-facing change?
No behavior changes
### How was this patch tested?
github actions
### Was this patch authored or co-authored using generative AI tooling?
No
Closes #54790 from simolanayak/master.
Authored-by: Simola Nayak <si...@classranked.com>
Signed-off-by: Hyukjin Kwon <gu...@apache.org>
---
python/pyspark/_globals.py | 2 +-
python/pyspark/sql/connect/plan.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/python/pyspark/_globals.py b/python/pyspark/_globals.py
index 1b8c827ae22d..81b4be145283 100644
--- a/python/pyspark/_globals.py
+++ b/python/pyspark/_globals.py
@@ -57,7 +57,7 @@ class _NoValueType:
def __new__(cls):
# ensure that only one instance exists
if not cls.__instance:
- cls.__instance = super(_NoValueType, cls).__new__(cls)
+ cls.__instance = super().__new__(cls)
return cls.__instance
# needed for python 2 to preserve identity through a pickle
diff --git a/python/pyspark/sql/connect/plan.py b/python/pyspark/sql/connect/plan.py
index 4ff7451d1314..e3ac645d0ceb 100644
--- a/python/pyspark/sql/connect/plan.py
+++ b/python/pyspark/sql/connect/plan.py
@@ -2840,7 +2840,7 @@ class CommonInlineUserDefinedDataSource(LogicalPlan):
class CachedRelation(LogicalPlan):
def __init__(self, plan: proto.Relation) -> None:
- super(CachedRelation, self).__init__(None)
+ super().__init__(None)
self._plan = plan
# Update the plan ID based on the incremented counter.
self._plan.common.plan_id = self._plan_id
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org