This repository was archived by the owner on Jun 9, 2025. It is now read-only.
This repository was archived by the owner on Jun 9, 2025. It is now read-only.
Support for deprecated field option #80
Open
Description
Summary
Add a warning message when a deprecated field is used.
What is the feature request for?
The core library
The Problem
In betterproto's Python code generator, the Protobuf deprecated field option is currently ignored—fields marked with the deprecated = true
field option in .proto files produce no warnings, annotations, or deprecation notices in the generated Python classes.
As a result, it is harder for client code to know about the deprecation with no guidance or runtime warnings to steer developers toward the newer fields.
The Ideal Solution
It would be great if the generated classes had a override in the __getattribute__
method that would raise a warning when a deprecated field is used/set.
The Current Solution
N/A