Skip to content

[Python] Trim Python2 backward compatiblity syntax - removed (object) inheritance#41708

Closed
a-detiste wants to merge 8 commits into
grpc:masterfrom
a-detiste:master
Closed

[Python] Trim Python2 backward compatiblity syntax - removed (object) inheritance#41708
a-detiste wants to merge 8 commits into
grpc:masterfrom
a-detiste:master

Conversation

@a-detiste

Copy link
Copy Markdown
Contributor

"(object)" was there in Python 2 to diffenretiate the "old" from the "new" classes.

We only have "new" classes in Python 3.

a-detiste and others added 3 commits February 4, 2026 21:58
"(object)" was there in Python 2 to difenretiate the "old" from the "new" classes.

We only have "new" classes in Python 3.
@markdroth markdroth assigned sreenithi and unassigned pawbhard Feb 24, 2026
@sergiitk sergiitk added release notes: yes Indicates if PR needs to be in release notes kokoro:run labels Feb 24, 2026
@sergiitk

Copy link
Copy Markdown
Member

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request is a large-scale refactoring that removes Python 2 backward compatibility syntax, specifically the explicit inheritance from object in class definitions. The changes are applied consistently across the codebase, including handwritten Python files and the C++ code responsible for generating Python gRPC stubs. This modernization is appropriate for a Python 3 codebase. The changes are correct and I have no issues to report.

@sergiitk sergiitk requested review from asheshvidyut and removed request for sergiitk February 25, 2026 17:15

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't own the files in the third_party directory, so we shouldn't be changing it.

@asheshvidyut asheshvidyut left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@asheshvidyut asheshvidyut changed the title [Python] trim Python2 backward compatiblity syntax [Python] Trim Python2 backward compatiblity syntax - removed (object) inheritance Mar 8, 2026
Zgoda91 pushed a commit to Zgoda91/grpc that referenced this pull request Mar 22, 2026
… inheritance (grpc#41708)

"(object)" was there in Python 2 to diffenretiate the "old" from the "new" classes.

We only have "new" classes in Python 3.

Closes grpc#41708

PiperOrigin-RevId: 882394070
asheshvidyut pushed a commit to asheshvidyut/grpc that referenced this pull request Mar 26, 2026
… inheritance (grpc#41708)

"(object)" was there in Python 2 to diffenretiate the "old" from the "new" classes.

We only have "new" classes in Python 3.

Closes grpc#41708

PiperOrigin-RevId: 882394070
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bloat/none lang/core lang/Python release notes: yes Indicates if PR needs to be in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants