danielgtaylor / danielgtaylor/python-betterproto

Reflections don't work (I may know why)

Aperta
#443 8 commenti 8 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
1.8k
Fork
234
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I use server reflection as defined in [the documentation](https://grpclib.readthedocs.io/en/latest/reflection.html) and I have a single service called `helloworld.Greeter`.

gRPC call `list_services: "*"` is processed fine and returns a single service `helloworld.Greeter`.

However, `file_containing_symbol: "helloworld.Greeter"` only returns an error `not found`

Throughout my own investigation I found that error can be traced to
[grpclib/reflection/_deprecated.py:L79](https://github.com/vmagamedov/grpclib/blob/master/grpclib/reflection/_deprecated.py#L79)
Where `self._pool` does not have any descriptors for `helloworld.Greeter` or any of its methods

I suspect that [THIS](https://github.com/vmagamedov/grpclib/blob/master/examples/helloworld/helloworld_pb2.py#L17) is how the descriptors should be added in order for reflections to work with betterproto

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.