zhengruifeng opened a new pull request, #55608:
URL: https://github.com/apache/spark/pull/55608

   ### What changes were proposed in this pull request?
   
   Three PySpark test mixin classes still inherit explicitly from `object`:
   
   - `python/pyspark/sql/tests/test_udf.py` — `BaseUDFTestsMixin(object)`
   - `python/pyspark/sql/tests/test_resources.py` — 
`ResourceProfileTestsMixin(object)`
   - `python/pyspark/sql/tests/arrow/test_arrow_map.py` — 
`MapInArrowTestsMixin(object)`
   
   This PR drops the explicit `(object)` base, matching the modern `class Foo:` 
form used by the other ~50 mixin classes in `pyspark.sql.tests`.
   
   ### Why are the changes needed?
   
   `class Foo(object):` is a Python 2 idiom required to opt into new-style 
classes. Under Python 3 — which is the only version Spark supports — every 
class implicitly inherits from `object`, so the `(object)` base is dead code. 
Three mixins still carry the legacy form while the rest of the test suite has 
standardized on the modern form; aligning them keeps the codebase consistent 
and removes a small piece of cargo-culted boilerplate that occasionally gets 
copied into new mixins.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No. Test-only change with no behavioral impact.
   
   ### How was this patch tested?
   
   Existing tests. `class Foo(object):` and `class Foo:` produce identical 
classes under Python 3 (same MRO, same `__bases__`, same `isinstance` results).
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Opus 4.7)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to