Skip to content

help(MyMessage) crashes#185

Open
matt-rndbt wants to merge 2 commits intobetterproto:mainfrom
matt-rndbt:fix-help
Open

help(MyMessage) crashes#185
matt-rndbt wants to merge 2 commits intobetterproto:mainfrom
matt-rndbt:fix-help

Conversation

@matt-rndbt
Copy link

@matt-rndbt matt-rndbt commented Mar 9, 2026

Summary

Calling help(MyMessage) throws an error

/opt/homebrew/Cellar/python@3.13/3.13.5/Frameworks/Python.framework/Versions/3.13/lib/python3.13/pydoc.py:350: in classify_class_attrs
    for (name, kind, cls, value) in inspect.classify_class_attrs(object):
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/homebrew/Cellar/python@3.13/3.13.5/Frameworks/Python.framework/Versions/3.13/lib/python3.13/inspect.py:714: in classify_class_attrs
    srch_obj = getattr(srch_cls, name, None)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/betterproto2/utils.py:15: in __get__
    return self.__func__(type)
           ^^^^^^^^^^^^^^^^^^^
src/betterproto2/__init__.py:719: in _betterproto
    cls._betterproto_meta = ProtoClassMetadata(cls)
                            ^^^^^^^^^^^^^^^^^^^^^^^
src/betterproto2/__init__.py:494: in __init__
    assert dataclasses.is_dataclass(cls)
           ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^

Unrelatedly, I updated the test readme with the correct command name get-local-compiled-tests

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
    • This change has an associated test.
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)

@matt-rndbt matt-rndbt changed the title Reproduce help bug help() function crashes Mar 9, 2026
@matt-rndbt matt-rndbt changed the title help() function crashes help(MyMessage) crashes Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant