We need talk about type security ( in the interface definition) #45
Locked
oseasandrepro
started this conversation in
study/research
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
First read about Security_type_system
Here we have python doc about typing: typing — Support for type hints
and here PEP 526 — Syntax for Variable Annotations
Introduction to the RPC Specification
Related commits:
Release v2.1.0
Formalize interface definition language and data definition language.
The idia hers is: since SRPC use Python as IDL all content of <module_name>_interface.py and <module_name>.py must use type hint mandatorily. Link: 26fff9a
Release v3.1.1
Bugfix: fix genetared parameter tuple for single parameter method in generated code for Python client Stub
Feat: Improve framework type safety. Disallows generic types that omit explicit type parameters, forcing you to write types like list[int] or dict[str, int] instead of raw list or dict in service interface definition. Link: 10ca85b
All reactions