grpc / grpc/grpc

Change Some Cython classes to Enum

Open
#32,033 2 comments 1 reaction 1 assignee Claimed by @asheshvidyut View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.