protobuf icon indicating copy to clipboard operation
protobuf copied to clipboard

gRPC python type stubs not accurately reflecting runtime

Open Avasam opened this issue 7 months ago • 19 comments

What version of protobuf and what language are you using? Version: grpcio 1.71.0 Language: Python

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

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

What did you do? I'm migrating the following issues over from https://github.com/grpc/grpc:

  • https://github.com/grpc/grpc/issues/39404
  • https://github.com/grpc/grpc/issues/39406
  • https://github.com/grpc/grpc/issues/39407

Ran stubtest on grpcio-reflection, grpcio-health-checking and grpcio-channelz. In my case it was in the context of running it on Typeshed:

  1. Clone typeshed at or after this commit: https://github.com/python/typeshed/commit/a43e0a4c02398ea169aeb5b33c661470b2f7be5e
  2. Copy grpc's 2.1. grpc_reflection/v1alpha/reflection_pb2.pyi over typeshed's stubs/grpcio-reflection/grpc_reflection/v1alpha/reflection_pb2.pyi 2.2. grpcio-health-checking/grpc_health/v1/health_pb2.pyi over typeshed's stubs/grpcio-health-checking/grpc_health/v1/health_pb2.pyi 2.3. grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi over typeshed's stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi
  3. run pip install -r requirements-tests.txt
  4. run python ./tests/stubtest_third_party.py grpcio-reflection

What did you expect to see No stubtest error for *_pb2.pyi files. Meaning they correctly reflect runtime.

What did you see instead?

`grpcio-reflection`
grpcio-reflection... (6.27 s) fail

**********************************************************************

Commands run:

/tmp/stubtest-ats7qbgg/bin/pip install grpcio-reflection[]==1.* mypy==1.15.0
MYPYPATH=stubs/grpcio-reflection:stubs/protobuf:stubs/grpcio /tmp/stubtest-ats7qbgg/bin/python -m mypy.stubtest --custom-typeshed-dir . grpc_reflection

**********************************************************************

Command output:

error: grpc_reflection.v1alpha.reflection_pb2.ErrorResponse cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-reflection/grpc_reflection/v1alpha/reflection_pb2.pyi:76
<TypeInfo grpc_reflection.v1alpha.reflection_pb2.ErrorResponse>
Runtime: in file /tmp/stubtest-ats7qbgg/lib/python3.13/site-packages/grpc_reflection/v1alpha/reflection_pb2.py
<class 'grpc_reflection.v1alpha.reflection_pb2.ErrorResponse'>

error: grpc_reflection.v1alpha.reflection_pb2.ErrorResponse is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-reflection/grpc_reflection/v1alpha/reflection_pb2.pyi:76
N/A
Runtime: in file /tmp/stubtest-ats7qbgg/lib/python3.13/site-packages/grpc_reflection/v1alpha/reflection_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_reflection.v1alpha.reflection_pb2.ErrorResponse.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-reflection/grpc_reflection/v1alpha/reflection_pb2.pyi:77
tuple[builtins.str, builtins.str]
Runtime:
()

error: grpc_reflection.v1alpha.reflection_pb2.ExtensionNumberResponse cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-reflection/grpc_reflection/v1alpha/reflection_pb2.pyi:56
<TypeInfo grpc_reflection.v1alpha.reflection_pb2.ExtensionNumberResponse>
Runtime: in file /tmp/stubtest-ats7qbgg/lib/python3.13/site-packages/grpc_reflection/v1alpha/reflection_pb2.py
<class 'grpc_reflection.v1alpha.reflection_pb2.ExtensionNumberResponse'>

error: grpc_reflection.v1alpha.reflection_pb2.ExtensionNumberResponse is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-reflection/grpc_reflection/v1alpha/reflection_pb2.pyi:56
N/A
Runtime: in file /tmp/stubtest-ats7qbgg/lib/python3.13/site-packages/grpc_reflection/v1alpha/reflection_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_reflection.v1alpha.reflection_pb2.ExtensionNumberResponse.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-reflection/grpc_reflection/v1alpha/reflection_pb2.pyi:57
tuple[builtins.str, builtins.str]
Runtime:
()

error: grpc_reflection.v1alpha.reflection_pb2.ExtensionRequest cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-reflection/grpc_reflection/v1alpha/reflection_pb2.pyi:26
<TypeInfo grpc_reflection.v1alpha.reflection_pb2.ExtensionRequest>
Runtime: in file /tmp/stubtest-ats7qbgg/lib/python3.13/site-packages/grpc_reflection/v1alpha/reflection_pb2.py
<class 'grpc_reflection.v1alpha.reflection_pb2.ExtensionRequest'>

error: grpc_reflection.v1alpha.reflection_pb2.ExtensionRequest is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-reflection/grpc_reflection/v1alpha/reflection_pb2.pyi:26
N/A
Runtime: in file /tmp/stubtest-ats7qbgg/lib/python3.13/site-packages/grpc_reflection/v1alpha/reflection_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_reflection.v1alpha.reflection_pb2.ExtensionRequest.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-reflection/grpc_reflection/v1alpha/reflection_pb2.pyi:27
tuple[builtins.str, builtins.str]
Runtime:
()

error: grpc_reflection.v1alpha.reflection_pb2.FileDescriptorResponse cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-reflection/grpc_reflection/v1alpha/reflection_pb2.pyi:50
<TypeInfo grpc_reflection.v1alpha.reflection_pb2.FileDescriptorResponse>
Runtime: in file /tmp/stubtest-ats7qbgg/lib/python3.13/site-packages/grpc_reflection/v1alpha/reflection_pb2.py
<class 'grpc_reflection.v1alpha.reflection_pb2.FileDescriptorResponse'>

error: grpc_reflection.v1alpha.reflection_pb2.FileDescriptorResponse is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-reflection/grpc_reflection/v1alpha/reflection_pb2.pyi:50
N/A
Runtime: in file /tmp/stubtest-ats7qbgg/lib/python3.13/site-packages/grpc_reflection/v1alpha/reflection_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_reflection.v1alpha.reflection_pb2.FileDescriptorResponse.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-reflection/grpc_reflection/v1alpha/reflection_pb2.pyi:51
tuple[builtins.str]
Runtime:
()

error: grpc_reflection.v1alpha.reflection_pb2.ListServiceResponse cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-reflection/grpc_reflection/v1alpha/reflection_pb2.pyi:64
<TypeInfo grpc_reflection.v1alpha.reflection_pb2.ListServiceResponse>
Runtime: in file /tmp/stubtest-ats7qbgg/lib/python3.13/site-packages/grpc_reflection/v1alpha/reflection_pb2.py
<class 'grpc_reflection.v1alpha.reflection_pb2.ListServiceResponse'>

error: grpc_reflection.v1alpha.reflection_pb2.ListServiceResponse is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-reflection/grpc_reflection/v1alpha/reflection_pb2.pyi:64
N/A
Runtime: in file /tmp/stubtest-ats7qbgg/lib/python3.13/site-packages/grpc_reflection/v1alpha/reflection_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_reflection.v1alpha.reflection_pb2.ListServiceResponse.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-reflection/grpc_reflection/v1alpha/reflection_pb2.pyi:65
tuple[builtins.str]
Runtime:
()

error: grpc_reflection.v1alpha.reflection_pb2.ServerReflectionRequest cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-reflection/grpc_reflection/v1alpha/reflection_pb2.pyi:10
<TypeInfo grpc_reflection.v1alpha.reflection_pb2.ServerReflectionRequest>
Runtime: in file /tmp/stubtest-ats7qbgg/lib/python3.13/site-packages/grpc_reflection/v1alpha/reflection_pb2.py
<class 'grpc_reflection.v1alpha.reflection_pb2.ServerReflectionRequest'>

error: grpc_reflection.v1alpha.reflection_pb2.ServerReflectionRequest is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-reflection/grpc_reflection/v1alpha/reflection_pb2.pyi:10
N/A
Runtime: in file /tmp/stubtest-ats7qbgg/lib/python3.13/site-packages/grpc_reflection/v1alpha/reflection_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_reflection.v1alpha.reflection_pb2.ServerReflectionRequest.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-reflection/grpc_reflection/v1alpha/reflection_pb2.pyi:11
tuple[builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str]
Runtime:
()

error: grpc_reflection.v1alpha.reflection_pb2.ServerReflectionResponse cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-reflection/grpc_reflection/v1alpha/reflection_pb2.pyi:34
<TypeInfo grpc_reflection.v1alpha.reflection_pb2.ServerReflectionResponse>
Runtime: in file /tmp/stubtest-ats7qbgg/lib/python3.13/site-packages/grpc_reflection/v1alpha/reflection_pb2.py
<class 'grpc_reflection.v1alpha.reflection_pb2.ServerReflectionResponse'>

error: grpc_reflection.v1alpha.reflection_pb2.ServerReflectionResponse is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-reflection/grpc_reflection/v1alpha/reflection_pb2.pyi:34
N/A
Runtime: in file /tmp/stubtest-ats7qbgg/lib/python3.13/site-packages/grpc_reflection/v1alpha/reflection_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_reflection.v1alpha.reflection_pb2.ServerReflectionResponse.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-reflection/grpc_reflection/v1alpha/reflection_pb2.pyi:35
tuple[builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str]
Runtime:
()

error: grpc_reflection.v1alpha.reflection_pb2.ServiceResponse cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-reflection/grpc_reflection/v1alpha/reflection_pb2.pyi:70
<TypeInfo grpc_reflection.v1alpha.reflection_pb2.ServiceResponse>
Runtime: in file /tmp/stubtest-ats7qbgg/lib/python3.13/site-packages/grpc_reflection/v1alpha/reflection_pb2.py
<class 'grpc_reflection.v1alpha.reflection_pb2.ServiceResponse'>

error: grpc_reflection.v1alpha.reflection_pb2.ServiceResponse is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-reflection/grpc_reflection/v1alpha/reflection_pb2.pyi:70
N/A
Runtime: in file /tmp/stubtest-ats7qbgg/lib/python3.13/site-packages/grpc_reflection/v1alpha/reflection_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_reflection.v1alpha.reflection_pb2.ServiceResponse.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-reflection/grpc_reflection/v1alpha/reflection_pb2.pyi:71
tuple[builtins.str]
Runtime:
()

error: grpc_reflection.v1alpha.proto_reflection_descriptor_database failed to find stubs
Stub:
MISSING
Runtime:
N/A

Found 25 errors (checked 8 modules)
`grpcio-health-checking`
grpcio-health-checking... (5.92 s) fail

**********************************************************************

Commands run:

/tmp/stubtest-jua4nvkp/bin/pip install grpcio-health-checking[]==1.* mypy==1.15.0
MYPYPATH=stubs/grpcio-health-checking:stubs/protobuf:stubs/grpcio /tmp/stubtest-jua4nvkp/bin/python -m mypy.stubtest --custom-typeshed-dir . grpc_health

**********************************************************************

Command output:

error: grpc_health.v1.health_pb2.HealthCheckRequest cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-health-checking/grpc_health/v1/health_pb2.pyi:8
<TypeInfo grpc_health.v1.health_pb2.HealthCheckRequest>
Runtime: in file /tmp/stubtest-jua4nvkp/lib/python3.13/site-packages/grpc_health/v1/health_pb2.py
<class 'grpc_health.v1.health_pb2.HealthCheckRequest'>

error: grpc_health.v1.health_pb2.HealthCheckRequest is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-health-checking/grpc_health/v1/health_pb2.pyi:8
N/A
Runtime: in file /tmp/stubtest-jua4nvkp/lib/python3.13/site-packages/grpc_health/v1/health_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_health.v1.health_pb2.HealthCheckRequest.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-health-checking/grpc_health/v1/health_pb2.pyi:9
tuple[builtins.str]
Runtime:
()

error: grpc_health.v1.health_pb2.HealthCheckResponse cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-health-checking/grpc_health/v1/health_pb2.pyi:14
<TypeInfo grpc_health.v1.health_pb2.HealthCheckResponse>
Runtime: in file /tmp/stubtest-jua4nvkp/lib/python3.13/site-packages/grpc_health/v1/health_pb2.py
<class 'grpc_health.v1.health_pb2.HealthCheckResponse'>

error: grpc_health.v1.health_pb2.HealthCheckResponse is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-health-checking/grpc_health/v1/health_pb2.pyi:14
N/A
Runtime: in file /tmp/stubtest-jua4nvkp/lib/python3.13/site-packages/grpc_health/v1/health_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_health.v1.health_pb2.HealthCheckResponse.NOT_SERVING variable differs from runtime type Literal[2]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-health-checking/grpc_health/v1/health_pb2.pyi:24
grpc_health.v1.health_pb2.HealthCheckResponse.ServingStatus
Runtime:
2

error: grpc_health.v1.health_pb2.HealthCheckResponse.SERVICE_UNKNOWN variable differs from runtime type Literal[3]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-health-checking/grpc_health/v1/health_pb2.pyi:25
grpc_health.v1.health_pb2.HealthCheckResponse.ServingStatus
Runtime:
3

error: grpc_health.v1.health_pb2.HealthCheckResponse.SERVING variable differs from runtime type Literal[1]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-health-checking/grpc_health/v1/health_pb2.pyi:23
grpc_health.v1.health_pb2.HealthCheckResponse.ServingStatus
Runtime:
1

error: grpc_health.v1.health_pb2.HealthCheckResponse.ServingStatus is not a type
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-health-checking/grpc_health/v1/health_pb2.pyi:16
<TypeInfo grpc_health.v1.health_pb2.HealthCheckResponse.ServingStatus>
Runtime:
<google.protobuf.internal.enum_type_wrapper.EnumTypeWrapper object at 0x7f8aa7bf1550>

error: grpc_health.v1.health_pb2.HealthCheckResponse.UNKNOWN variable differs from runtime type Literal[0]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-health-checking/grpc_health/v1/health_pb2.pyi:22
grpc_health.v1.health_pb2.HealthCheckResponse.ServingStatus
Runtime:
0

error: grpc_health.v1.health_pb2.HealthCheckResponse.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-health-checking/grpc_health/v1/health_pb2.pyi:15
tuple[builtins.str]
Runtime:
()

Found 11 errors (checked 6 modules)
`grpcio-channelz
grpcio-channelz... (6.32 s) fail

**********************************************************************

Commands run:

/tmp/stubtest-khawxkxs/bin/pip install grpcio-channelz[]==1.* mypy==1.15.0
MYPYPATH=stubs/grpcio-channelz:stubs/protobuf:stubs/grpcio /tmp/stubtest-khawxkxs/bin/python -m mypy.stubtest --custom-typeshed-dir . grpc_channelz

**********************************************************************

Command output:

error: grpc_channelz.v1.channelz_pb2.Address cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:212
<TypeInfo grpc_channelz.v1.channelz_pb2.Address>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.Address'>

error: grpc_channelz.v1.channelz_pb2.Address is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:212
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.Address.OtherAddress cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:226
<TypeInfo grpc_channelz.v1.channelz_pb2.Address.OtherAddress>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.OtherAddress'>

error: grpc_channelz.v1.channelz_pb2.Address.OtherAddress is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:226
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.Address.OtherAddress.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:227
tuple[builtins.str, builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.Address.TcpIpAddress cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:214
<TypeInfo grpc_channelz.v1.channelz_pb2.Address.TcpIpAddress>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.TcpIpAddress'>

error: grpc_channelz.v1.channelz_pb2.Address.TcpIpAddress is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:214
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.Address.TcpIpAddress.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:215
tuple[builtins.str, builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.Address.UdsAddress cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:221
<TypeInfo grpc_channelz.v1.channelz_pb2.Address.UdsAddress>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.UdsAddress'>

error: grpc_channelz.v1.channelz_pb2.Address.UdsAddress is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:221
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.Address.UdsAddress.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:222
tuple[builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.Address.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:213
tuple[builtins.str, builtins.str, builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.Channel cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:10
<TypeInfo grpc_channelz.v1.channelz_pb2.Channel>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.Channel'>

error: grpc_channelz.v1.channelz_pb2.Channel is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:10
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.Channel.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:11
tuple[builtins.str, builtins.str, builtins.str, builtins.str, builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.ChannelConnectivityState cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:38
<TypeInfo grpc_channelz.v1.channelz_pb2.ChannelConnectivityState>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.ChannelConnectivityState'>

error: grpc_channelz.v1.channelz_pb2.ChannelConnectivityState is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:38
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.ChannelConnectivityState.CONNECTING variable differs from runtime type Literal[2]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:50
grpc_channelz.v1.channelz_pb2.ChannelConnectivityState.State
Runtime:
2

error: grpc_channelz.v1.channelz_pb2.ChannelConnectivityState.IDLE variable differs from runtime type Literal[1]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:49
grpc_channelz.v1.channelz_pb2.ChannelConnectivityState.State
Runtime:
1

error: grpc_channelz.v1.channelz_pb2.ChannelConnectivityState.READY variable differs from runtime type Literal[3]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:51
grpc_channelz.v1.channelz_pb2.ChannelConnectivityState.State
Runtime:
3

error: grpc_channelz.v1.channelz_pb2.ChannelConnectivityState.SHUTDOWN variable differs from runtime type Literal[5]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:53
grpc_channelz.v1.channelz_pb2.ChannelConnectivityState.State
Runtime:
5

error: grpc_channelz.v1.channelz_pb2.ChannelConnectivityState.State is not a type
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:40
<TypeInfo grpc_channelz.v1.channelz_pb2.ChannelConnectivityState.State>
Runtime:
<google.protobuf.internal.enum_type_wrapper.EnumTypeWrapper object at 0x7fe46b3d9e80>

error: grpc_channelz.v1.channelz_pb2.ChannelConnectivityState.TRANSIENT_FAILURE variable differs from runtime type Literal[4]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:52
grpc_channelz.v1.channelz_pb2.ChannelConnectivityState.State
Runtime:
4

error: grpc_channelz.v1.channelz_pb2.ChannelConnectivityState.UNKNOWN variable differs from runtime type Literal[0]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:48
grpc_channelz.v1.channelz_pb2.ChannelConnectivityState.State
Runtime:
0

error: grpc_channelz.v1.channelz_pb2.ChannelConnectivityState.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:39
tuple[builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.ChannelData cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:58
<TypeInfo grpc_channelz.v1.channelz_pb2.ChannelData>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.ChannelData'>

error: grpc_channelz.v1.channelz_pb2.ChannelData is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:58
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.ChannelData.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:59
tuple[builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.ChannelRef cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:110
<TypeInfo grpc_channelz.v1.channelz_pb2.ChannelRef>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.ChannelRef'>

error: grpc_channelz.v1.channelz_pb2.ChannelRef is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:110
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.ChannelRef.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:111
tuple[builtins.str, builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.ChannelTrace cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:100
<TypeInfo grpc_channelz.v1.channelz_pb2.ChannelTrace>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.ChannelTrace'>

error: grpc_channelz.v1.channelz_pb2.ChannelTrace is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:100
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.ChannelTrace.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:101
tuple[builtins.str, builtins.str, builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.ChannelTraceEvent cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:76
<TypeInfo grpc_channelz.v1.channelz_pb2.ChannelTraceEvent>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.ChannelTraceEvent'>

error: grpc_channelz.v1.channelz_pb2.ChannelTraceEvent is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:76
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.ChannelTraceEvent.CT_ERROR variable differs from runtime type Literal[3]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:87
grpc_channelz.v1.channelz_pb2.ChannelTraceEvent.Severity
Runtime:
3

error: grpc_channelz.v1.channelz_pb2.ChannelTraceEvent.CT_INFO variable differs from runtime type Literal[1]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:85
grpc_channelz.v1.channelz_pb2.ChannelTraceEvent.Severity
Runtime:
1

error: grpc_channelz.v1.channelz_pb2.ChannelTraceEvent.CT_UNKNOWN variable differs from runtime type Literal[0]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:84
grpc_channelz.v1.channelz_pb2.ChannelTraceEvent.Severity
Runtime:
0

error: grpc_channelz.v1.channelz_pb2.ChannelTraceEvent.CT_WARNING variable differs from runtime type Literal[2]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:86
grpc_channelz.v1.channelz_pb2.ChannelTraceEvent.Severity
Runtime:
2

error: grpc_channelz.v1.channelz_pb2.ChannelTraceEvent.Severity is not a type
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:78
<TypeInfo grpc_channelz.v1.channelz_pb2.ChannelTraceEvent.Severity>
Runtime:
<google.protobuf.internal.enum_type_wrapper.EnumTypeWrapper object at 0x7fe46b3eca50>

error: grpc_channelz.v1.channelz_pb2.ChannelTraceEvent.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:77
tuple[builtins.str, builtins.str, builtins.str, builtins.str, builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.GetChannelRequest cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:415
<TypeInfo grpc_channelz.v1.channelz_pb2.GetChannelRequest>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.GetChannelRequest'>

error: grpc_channelz.v1.channelz_pb2.GetChannelRequest is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:415
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.GetChannelRequest.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:416
tuple[builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.GetChannelResponse cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:421
<TypeInfo grpc_channelz.v1.channelz_pb2.GetChannelResponse>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.GetChannelResponse'>

error: grpc_channelz.v1.channelz_pb2.GetChannelResponse is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:421
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.GetChannelResponse.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:422
tuple[builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.GetServerRequest cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:385
<TypeInfo grpc_channelz.v1.channelz_pb2.GetServerRequest>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.GetServerRequest'>

error: grpc_channelz.v1.channelz_pb2.GetServerRequest is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:385
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.GetServerRequest.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:386
tuple[builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.GetServerResponse cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:391
<TypeInfo grpc_channelz.v1.channelz_pb2.GetServerResponse>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.GetServerResponse'>

error: grpc_channelz.v1.channelz_pb2.GetServerResponse is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:391
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.GetServerResponse.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:392
tuple[builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.GetServerSocketsRequest cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:397
<TypeInfo grpc_channelz.v1.channelz_pb2.GetServerSocketsRequest>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.GetServerSocketsRequest'>

error: grpc_channelz.v1.channelz_pb2.GetServerSocketsRequest is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:397
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.GetServerSocketsRequest.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:398
tuple[builtins.str, builtins.str, builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.GetServerSocketsResponse cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:407
<TypeInfo grpc_channelz.v1.channelz_pb2.GetServerSocketsResponse>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.GetServerSocketsResponse'>

error: grpc_channelz.v1.channelz_pb2.GetServerSocketsResponse is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:407
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.GetServerSocketsResponse.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:408
tuple[builtins.str, builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.GetServersRequest cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:369
<TypeInfo grpc_channelz.v1.channelz_pb2.GetServersRequest>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.GetServersRequest'>

error: grpc_channelz.v1.channelz_pb2.GetServersRequest is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:369
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.GetServersRequest.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:370
tuple[builtins.str, builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.GetServersResponse cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:377
<TypeInfo grpc_channelz.v1.channelz_pb2.GetServersResponse>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.GetServersResponse'>

error: grpc_channelz.v1.channelz_pb2.GetServersResponse is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:377
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.GetServersResponse.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:378
tuple[builtins.str, builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.GetSocketRequest cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:439
<TypeInfo grpc_channelz.v1.channelz_pb2.GetSocketRequest>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.GetSocketRequest'>

error: grpc_channelz.v1.channelz_pb2.GetSocketRequest is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:439
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.GetSocketRequest.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:440
tuple[builtins.str, builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.GetSocketResponse cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:447
<TypeInfo grpc_channelz.v1.channelz_pb2.GetSocketResponse>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.GetSocketResponse'>

error: grpc_channelz.v1.channelz_pb2.GetSocketResponse is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:447
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.GetSocketResponse.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:448
tuple[builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.GetSubchannelRequest cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:427
<TypeInfo grpc_channelz.v1.channelz_pb2.GetSubchannelRequest>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.GetSubchannelRequest'>

error: grpc_channelz.v1.channelz_pb2.GetSubchannelRequest is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:427
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.GetSubchannelRequest.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:428
tuple[builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.GetSubchannelResponse cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:433
<TypeInfo grpc_channelz.v1.channelz_pb2.GetSubchannelResponse>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.GetSubchannelResponse'>

error: grpc_channelz.v1.channelz_pb2.GetSubchannelResponse is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:433
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.GetSubchannelResponse.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:434
tuple[builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.GetTopChannelsRequest cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:353
<TypeInfo grpc_channelz.v1.channelz_pb2.GetTopChannelsRequest>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.GetTopChannelsRequest'>

error: grpc_channelz.v1.channelz_pb2.GetTopChannelsRequest is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:353
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.GetTopChannelsRequest.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:354
tuple[builtins.str, builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.GetTopChannelsResponse cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:361
<TypeInfo grpc_channelz.v1.channelz_pb2.GetTopChannelsResponse>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.GetTopChannelsResponse'>

error: grpc_channelz.v1.channelz_pb2.GetTopChannelsResponse is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:361
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.GetTopChannelsResponse.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:362
tuple[builtins.str, builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.Security cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:241
<TypeInfo grpc_channelz.v1.channelz_pb2.Security>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.Security'>

error: grpc_channelz.v1.channelz_pb2.Security is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:241
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.Security.OtherSecurity cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:254
<TypeInfo grpc_channelz.v1.channelz_pb2.Security.OtherSecurity>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.OtherSecurity'>

error: grpc_channelz.v1.channelz_pb2.Security.OtherSecurity is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:254
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.Security.OtherSecurity.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:255
tuple[builtins.str, builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.Security.Tls cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:243
<TypeInfo grpc_channelz.v1.channelz_pb2.Security.Tls>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.Tls'>

error: grpc_channelz.v1.channelz_pb2.Security.Tls is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:243
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.Security.Tls.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:244
tuple[builtins.str, builtins.str, builtins.str, builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.Security.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:242
tuple[builtins.str, builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.Server cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:142
<TypeInfo grpc_channelz.v1.channelz_pb2.Server>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.Server'>

error: grpc_channelz.v1.channelz_pb2.Server is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:142
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.Server.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:143
tuple[builtins.str, builtins.str, builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.ServerData cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:152
<TypeInfo grpc_channelz.v1.channelz_pb2.ServerData>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.ServerData'>

error: grpc_channelz.v1.channelz_pb2.ServerData is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:152
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.ServerData.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:153
tuple[builtins.str, builtins.str, builtins.str, builtins.str, builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.ServerRef cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:134
<TypeInfo grpc_channelz.v1.channelz_pb2.ServerRef>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.ServerRef'>

error: grpc_channelz.v1.channelz_pb2.ServerRef is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:134
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.ServerRef.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:135
tuple[builtins.str, builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.Socket cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:166
<TypeInfo grpc_channelz.v1.channelz_pb2.Socket>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.Socket'>

error: grpc_channelz.v1.channelz_pb2.Socket is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:166
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.Socket.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:167
tuple[builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.SocketData cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:182
<TypeInfo grpc_channelz.v1.channelz_pb2.SocketData>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.SocketData'>

error: grpc_channelz.v1.channelz_pb2.SocketData is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:182
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.SocketData.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:183
tuple[builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.SocketOption cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:267
<TypeInfo grpc_channelz.v1.channelz_pb2.SocketOption>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.SocketOption'>

error: grpc_channelz.v1.channelz_pb2.SocketOption is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:267
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.SocketOption.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:268
tuple[builtins.str, builtins.str, builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.SocketOptionLinger cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:283
<TypeInfo grpc_channelz.v1.channelz_pb2.SocketOptionLinger>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.SocketOptionLinger'>

error: grpc_channelz.v1.channelz_pb2.SocketOptionLinger is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:283
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.SocketOptionLinger.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:284
tuple[builtins.str, builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.SocketOptionTcpInfo cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:291
<TypeInfo grpc_channelz.v1.channelz_pb2.SocketOptionTcpInfo>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.SocketOptionTcpInfo'>

error: grpc_channelz.v1.channelz_pb2.SocketOptionTcpInfo is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:291
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.SocketOptionTcpInfo.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:292
tuple[builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str, builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.SocketOptionTimeout cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:277
<TypeInfo grpc_channelz.v1.channelz_pb2.SocketOptionTimeout>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.SocketOptionTimeout'>

error: grpc_channelz.v1.channelz_pb2.SocketOptionTimeout is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:277
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.SocketOptionTimeout.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:278
tuple[builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.SocketRef cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:126
<TypeInfo grpc_channelz.v1.channelz_pb2.SocketRef>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.SocketRef'>

error: grpc_channelz.v1.channelz_pb2.SocketRef is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:126
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.SocketRef.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:127
tuple[builtins.str, builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.Subchannel cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:24
<TypeInfo grpc_channelz.v1.channelz_pb2.Subchannel>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.Subchannel'>

error: grpc_channelz.v1.channelz_pb2.Subchannel is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:24
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.Subchannel.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:25
tuple[builtins.str, builtins.str, builtins.str, builtins.str, builtins.str]
Runtime:
()

error: grpc_channelz.v1.channelz_pb2.SubchannelRef cannot be subclassed at runtime, but isn't marked with @final in the stub
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:118
<TypeInfo grpc_channelz.v1.channelz_pb2.SubchannelRef>
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'grpc_channelz.v1.channelz_pb2.SubchannelRef'>

error: grpc_channelz.v1.channelz_pb2.SubchannelRef is inconsistent, metaclass differs
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:118
N/A
Runtime: in file /tmp/stubtest-khawxkxs/lib/python3.13/site-packages/grpc_channelz/v1/channelz_pb2.py
<class 'google._upb._message.MessageMeta'>

error: grpc_channelz.v1.channelz_pb2.SubchannelRef.__slots__ variable differs from runtime type tuple[()]
Stub: in file /home/runner/work/typeshed/typeshed/stubs/grpcio-channelz/grpc_channelz/v1/channelz_pb2.pyi:119
tuple[builtins.str, builtins.str]
Runtime:
()

Found 129 errors (checked 7 modules)

In summary:

  • Classes are not marked as final using the @typing.final decorator
  • The stubs indicate classes have __slots__, when runtime doesn't
  • Classes in the stubs are all missing the google._upb._message.MessageMeta metaclass
  • DESCRIPTOR is actually from google._upb._message
  • Enum-like class difference * * (it looks like you're doing some kind of branded types, might be fine on usage, even if it doesn't exactly exposes what's at runtime)

Anything else we should know about your project / environment

This is stubtest: https://mypy.readthedocs.io/en/stable/stubtest.html

Avasam avatar May 09 '25 15:05 Avasam

Classes are not marked as final using the @typing.final decorator

Marking classes as final in .pyi sounds like a great idea.

The stubs indicate classes have slots, when runtime doesn't

What is the meaning of __slots__ in a stub? It looks like we're able to specify the properties manually, separate from __slots__. So I don't see the harm in removing this, but we'd need to check that this doesn't break anything internally.

Classes in the stubs are all missing the google._upb._message.MessageMeta metaclass

I consider the MessageMeta metaclass to be an internal implementation detail that should not be part of the public interface contract.

Why do stubs want the metaclass to be specified?

DESCRIPTOR is actually from google._upb._message

While the type is indeed implemented in the _message extension, its publicly accessible name is google.protobuf.descriptor.Descriptor.

It looks like that is a bit of a fib though. They are actually two separate classes, and we use a metaclass to make isinstance succeed: https://github.com/protocolbuffers/protobuf/blob/f9727e802c0b18cb7dc25c0df861df6907f3de46/python/google/protobuf/descriptor.py#L40-L52

We definitely don't want to expose the internal name google._upb._message.Descriptor, but maybe we could tweak our approach here so that the google.protobuf.descriptor.Descriptor was just an alias for google._upb._message.Descriptor.

haberman avatar May 09 '25 16:05 haberman

Assigning to @anandolee for further investigation.

haberman avatar May 09 '25 16:05 haberman

What is the meaning of __slots__ in a stub?

I don't think there's a special meaning for stubs. Other than letting users access that attribute directly without attribute access error:

# type stubs
class MyClass:
    __slots__ = ("foo", "bar")
   foo: str
   bar: int
MyClass.__slots__  # no type-checking error

I could see a type-checker have special handling in non-strict mode: like allowing unknown attributes get/set in non-strict mode, but still disallowing it if __slots__ are set.

In any case it seems it would be incorrect here since it doesn't look like __slots__ are set at runtime.


If you deem something internal implementation and prefer not exposing it at all, that's fine. (in some cases it could introduce inconsistencies in isinstance checks between what static tools see and what happens at runtime)


Why do stubs want the metaclass to be specified?

Stubtest specifically checks all the differences between definition and runtime. If a metaclass doesn't actually affect the visible signature of a class, and should be completely transparent to any intended runtime use, then feel free to not include it if it's easier.

In typeshed, where this is more of a concern for us, we try to match runtime as closely as we can, and will expose some private API only when necessary to do so. It's easier to not have to guess at the original intents. As a maintainer of your project, you're better placed to know if that's something you care about, or would prefer hiding.

Avasam avatar May 09 '25 17:05 Avasam

I could see a type-checker have special handling in non-strict mode: like allowing unknown attributes get/set in non-strict mode, but still disallowing it if slots are set.

I discovered this to be the case. In some cases (not with mypy), I found that unknown attributes were not checked unless I added __slots__ = ().

haberman avatar Aug 13 '25 21:08 haberman

We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment.

This issue is labeled inactive because the last activity was over 90 days ago. This issue will be closed and archived after 14 additional days without activity.

github-actions[bot] avatar Nov 12 '25 10:11 github-actions[bot]

active

Avasam avatar Nov 12 '25 13:11 Avasam

The addition of __slots__ = () also causes issues in some linters (PyCharm, in my case) where all fields are regarded as read-only and undefined.

class Nya(_message.Message):
    __slots__ = ()
    MEOW_FIELD_NUMBER: _ClassVar[int]
    meow: int
    def __init__(self, meow: _Optional[int] = ...) -> None: ...

...

nya = Nya()
nya.meow = 1

# 'Nya' object attribute 'meow' is read-only 
# 'Nya' object has no attribute 'meow' 

which is technically the correct behavior, slots is defined, and it is empty indicating that no field is visible.

neptuwunium avatar Dec 02 '25 11:12 neptuwunium

Is there any way to make both type checkers happy? It sounds like the Python type checking semantics are not always consistent across tools.

haberman avatar Dec 02 '25 16:12 haberman

I have to agree that this doesn't seem like the correct approach. Tested with protoc 33.1, I get a christmas tree of warnings. It (curiously) throws both of these for each field:

'ResponseHeader' object attribute 'error_code' is read-only 
'ResponseHeader' object has no attribute 'error_code' 
Image

Kyle-sandeman-mrdfood avatar Dec 03 '25 09:12 Kyle-sandeman-mrdfood

If anyone can propose a solution that makes both mypy and PyCharm happy, we'd be happy to accept a contribution.

haberman avatar Dec 03 '25 17:12 haberman

It's interesting that the change to protobuf 33 is described to fix mypy because I'm having the opposite experience -- mypy worked prior to the change, but afterwards I'm getting the following:

path/to/my/file.py:662: error: Trying to assign name "user" that is not in "__slots__"
of type "my_proto.ProtoClass"  [misc]
            p.user = "user-value"

Tried this with mypy from 1.16 to 1.19 and all produces the same outcome. @haberman was this what you were trying to fix, or is this a different manifestation of the issue here?

jasonkuster avatar Dec 05 '25 18:12 jasonkuster

It's been a while since I looked at this, so my memory doesn't help. But looking at https://github.com/protocolbuffers/protobuf/issues/21691#issuecomment-3185957672, it seems that my testing showed that a statement like msg.nonexistent_field= 1 was not flagged as an error by mypy unless I added __slots__ = ().

haberman avatar Dec 05 '25 19:12 haberman

FWIW, having adding __slots__ to stubs is not one of the discrepancies I noted in my original issue. I only mentioned classes that have __slots__ in the stubs when it's not present at runtime.

https://github.com/protocolbuffers/protobuf/pull/23156 does not solve anything I mentioned, in fact it worsens it. If __slots__ aren't present at runtime, then stubs should not have __slots__ = ().

"Lack of __slots__" and "__slots__ set to an empty tuple" are not the same thing at all. One says any attribute can be set, the other says no attribute can be set (and class attributes are readonly).


We have to leave an empty __slots__ = () in place, as opposed to removing it entirely, because that's the only way to ensure that pytype will continue to error out if an unknown member is read or written.

pytype not having a strict mode to detect unknown attributes is not a valid reason imo to lie about __slots__, especially given that pytype development is no longer supported

Avasam avatar Dec 05 '25 19:12 Avasam

It's been a while since I looked at this, so my memory doesn't help. But looking at #21691 (comment), it seems that my testing showed that a statement like msg.nonexistent_field= 1 was not flagged as an error by mypy unless I added __slots__ = ().

See https://mypy.readthedocs.io/en/stable/error_code_list.html#check-that-attribute-exists-attr-defined

Unless you meant pytype, in which case, see my previous comment.

Avasam avatar Dec 05 '25 19:12 Avasam

Is there any major objection to reverting this change for the time being? It seems the immediately available options are:

  • "__slots__ includes all settable fields in the pyi file" (the case before 33.0)
    • pro: Prevents setting fields which don't exist on the proto
    • con: creates errors generating typeshed because __slots__ is not actually set on the class itself
  • "__slots__ is not set at all"
    • pro: .pyi file is true to the actual .py file
    • con: no errors when setting fields which don't exist

and we're currently in the situation:

  • "__slots__ is set to ()"
    • pro: prevents setting fields which don't exist on the proto
    • con: breaks typechecking in mypy, pycharm (reportedly), and doesn't fix the underlying issue with typeshed

My suggestion would be to revert https://github.com/protocolbuffers/protobuf/pull/23156 and go back to the original situation in the interim while progress is made on fixing the typeshed issue.

jasonkuster avatar Dec 05 '25 22:12 jasonkuster

@jasonkuster thanks for the summary!

If reverting https://github.com/protocolbuffers/protobuf/pull/23156 would be the most helpful for the time being, I'm happy to do that.

haberman avatar Dec 05 '25 22:12 haberman

Yeah if you don't object it seems like the best short term option (and I see a 👍 from the OP on my message so it seems like we have some agreement on that). Thanks!

jasonkuster avatar Dec 05 '25 23:12 jasonkuster

Would it be better from your perspective if we removed __slots__ entirely?

The example given at https://mypy.readthedocs.io/en/stable/error_code_list.html#check-that-attribute-exists-attr-defined suggests that you can still get attr-defined errors even if __slots__ is not set (which is what we want).

Do we know if PyCharm will do the same?

I have created these two pull requests, and can work to land whichever one seems more desirable:

  • https://github.com/protocolbuffers/protobuf/pull/24787
  • https://github.com/protocolbuffers/protobuf/pull/24790

haberman avatar Dec 10 '25 20:12 haberman

I'd suggest:

  • submit the rollback, and if possible release 33.3 (since our understanding now is that this is a "regression"-ish in 33.x).
  • evaluate removing __slots__ entirely as a follow-up (for 34.0+), since doing so probably requires a bit more investigation.

jasonkuster avatar Dec 10 '25 21:12 jasonkuster

Hi @haberman I see the first PR merged, thanks so much! Are you willing/able to cut a 33.3 release containing that PR? I'm trying to prep my codebase for bazel 9 which requires >=33.0, and I'm hoping to use a released version of protobuf rather than pinning to a commit if possible. :) If there's anything I can do to help with that please let me know.

jasonkuster avatar Dec 16 '25 18:12 jasonkuster

Hi @jasonkuster, yes, v33.3 is coming soon (hopefully this week), and will include this change.

haberman avatar Dec 16 '25 18:12 haberman

Wonderful news, thanks so much 😁

jasonkuster avatar Dec 16 '25 19:12 jasonkuster