Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaking change introduced with 1.64.0 and add_registered_method_handlers function #36683

Closed
prashantgupta24 opened this issue May 21, 2024 · 4 comments

Comments

@prashantgupta24
Copy link

prashantgupta24 commented May 21, 2024

What version of gRPC and what language are you using?

1.64.0/python

What operating system (Linux, Windows,...) and version?

linux

What runtime / compiler are you using (e.g. python version or version of gcc)

python 3.9

What did you do?

We are unable to create subclasses from grpc.Server anymore unless we additionally add the add_registered_method_handlers function, which was added as a new abstract method within src/python/grpcio/grpc/__init__.py in #36371

What did you expect to see?

We should be allowed to inherit from grpc.Server without having to change existing behavior since this is a minor release?

What did you see instead?

TypeError: Can't instantiate abstract class xyz with abstract method add_registered_method_handlers

See TROUBLESHOOTING.md for how to diagnose problems better.

Anything else we should know about your project / environment?

@gnossen
Copy link
Contributor

gnossen commented May 21, 2024

Thanks for the report! This was an oversight -- these methods should not have been marked as abstract. We'll release a patch with this updated to resolve.

@XuanWang-Amos
Copy link
Contributor

Reopen since we still need to backport this change.

@XuanWang-Amos XuanWang-Amos reopened this May 22, 2024
XuanWang-Amos added a commit to XuanWang-Amos/grpc that referenced this issue May 22, 2024
…hod_handlers (grpc#36684)

Remove `@abc.abstractmethod` so we don't break backward compatibility.

Fix: grpc#36683

<!--

If you know who should review your pull request, please assign it to that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the appropriate
lang label.

-->

Closes grpc#36684

COPYBARA_INTEGRATE_REVIEW=grpc#36684 from XuanWang-Amos:remove_abstractmethod_for_registered_method f748fa6
PiperOrigin-RevId: 636186951
yashykt pushed a commit that referenced this issue May 23, 2024
…hod_handlers (v1.64.x backport) (#36696)

Backport of #36684 to v1.64.x.
---
Remove `@abc.abstractmethod` so we don't break backward compatibility.

Fix: #36683

<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
jdcormie pushed a commit to jdcormie/grpc that referenced this issue May 24, 2024
…hod_handlers (grpc#36684)

Remove `@abc.abstractmethod` so we don't break backward compatibility.

Fix: grpc#36683

<!--

If you know who should review your pull request, please assign it to that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the appropriate
lang label.

-->

Closes grpc#36684

COPYBARA_INTEGRATE_REVIEW=grpc#36684 from XuanWang-Amos:remove_abstractmethod_for_registered_method f748fa6
PiperOrigin-RevId: 636186951
@jvolkman
Copy link

jvolkman commented Jun 3, 2024

It looks like this fix was released in 1.64.1 late last week. Will that version also be released to pypi? Thanks!

@XuanWang-Amos
Copy link
Contributor

Yes, I just uploaded 1.64.1 with this fix.

With that, we're closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants