Change Some Cython classes to Enum
Open
kind/enhancement
lang/Python
priority/P2
- Dominant language
- C++
- Stars
- 45.3k
- Forks
- 11.4k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 47
Description
We have some Cython classes which should be created as Enum (For example, [StatusCode](https://github.com/grpc/grpc/blob/master/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi#L61)), this is blocking us to use correct type annotation for them (Like [here](https://github.com/grpc/grpc/blob/master/src/python/grpcio/grpc/_server.py#L71)).
This change is required for the following classes:
* StatusCode: https://github.com/grpc/grpc/blob/master/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi#L61
* OperationType: https://github.com/grpc/grpc/blob/master/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi#L101
Contributor guide
Assessment
This issue has not been assessed yet.