Skip to content

Generated ServiceStub with rcp method "Metadata" gets overwriten by metadata parameter in parent class #224

@palani-johnson

Description

@palani-johnson

Summary

Any generated ServiceStub with an rcp that conflicts with a mutable parameter that is set in the parent class will get overwriten during parent class init.

Reproduction Steps

Generate a ServiceStub with an rcp named the same as a parameter that is set during the ServiceStub parent class initialization.

Expected Results

method is not overwritten during init

Actual Results

Method is overwritten by metadata. Attempting to call method results in TypeError: 'dict' object is not callable

System Information

betterproton2 0.10.0
python 3.13.7

Checklist

  • I have searched the issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have verified this issue occurs on the latest prelease of betterproto which can be installed using pip install -U --pre betterproto, if possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions