Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Presubmits fail with RecursionError: maximum recursion depth exceeded while calling a Python object when using protobuf at HEAD #425

Closed
@parthea

Description

@parthea

See PR #423
See build log here: https://github.com/googleapis/proto-plus-python/actions/runs/7576004395/job/20633856887?pr=423

____________________________________________________________________________________________________ test_message_pb ____________________________________________________________________________________________________

    def test_message_pb():
>       class Foo(proto.Message):

tests/test_message.py:205: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
proto/message.py:275: in __new__
    file_info.generate_file_pb(new_class=cls, fallback_salt=full_name)
proto/_file_info.py:113: in generate_file_pb
    pb_message = reflection.GeneratedProtocolMessageType(
.nox/unit-3-10/lib/python3.10/site-packages/google/protobuf/internal/python_message.py:166: in __init__
    descriptor.GetOptions().message_set_wire_format):
.nox/unit-3-10/lib/python3.10/site-packages/google/protobuf/descriptor.py:239: in GetOptions
    self._LazyLoadOptions()
.nox/unit-3-10/lib/python3.10/site-packages/google/protobuf/descriptor.py:219: in _LazyLoadOptions
    features = self._ResolveFeatures(
.nox/unit-3-10/lib/python3.10/site-packages/google/protobuf/descriptor.py:176: in _ResolveFeatures
    features.CopyFrom(self._parent._GetFeatures())
.nox/unit-3-10/lib/python3.10/site-packages/google/protobuf/descriptor.py:158: in _GetFeatures
    self._LazyLoadOptions()
.nox/unit-3-10/lib/python3.10/site-packages/google/protobuf/descriptor.py:205: in _LazyLoadOptions
    features = self._ResolveFeatures(
.nox/unit-3-10/lib/python3.10/site-packages/google/protobuf/descriptor.py:180: in _ResolveFeatures
    unresolved.CopyFrom(raw_options.features)
.nox/unit-3-10/lib/python3.10/site-packages/google/protobuf/internal/python_message.py:744: in getter
    field_value = field._default_constructor(self)
.nox/unit-3-10/lib/python3.10/site-packages/google/protobuf/internal/python_message.py:450: in MakeSubMessageDefault
    message_factory.GetMessageClass(message_type)
.nox/unit-3-10/lib/python3.10/site-packages/google/protobuf/message_factory.py:50: in GetMessageClass
    return _InternalCreateMessageClass(descriptor)
.nox/unit-3-10/lib/python3.10/site-packages/google/protobuf/message_factory.py:109: in _InternalCreateMessageClass
    result_class = _GENERATED_PROTOCOL_MESSAGE_TYPE(
.nox/unit-3-10/lib/python3.10/site-packages/google/protobuf/internal/python_message.py:174: in __init__
    _AttachFieldHelpers(cls, field)
.nox/unit-3-10/lib/python3.10/site-packages/google/protobuf/internal/python_message.py:269: in _AttachFieldHelpers
    is_repeated = field_descriptor.label == _FieldDescriptor.LABEL_REPEATED
.nox/unit-3-10/lib/python3.10/site-packages/google/protobuf/descriptor.py:722: in label
    self._GetFeatures().field_presence
.nox/unit-3-10/lib/python3.10/site-packages/google/protobuf/descriptor.py:158: in _GetFeatures
    self._LazyLoadOptions()
.nox/unit-3-10/lib/python3.10/site-packages/google/protobuf/descriptor.py:219: in _LazyLoadOptions
    features = self._ResolveFeatures(
.nox/unit-3-10/lib/python3.10/site-packages/google/protobuf/descriptor.py:176: in _ResolveFeatures
    features.CopyFrom(self._parent._GetFeatures())
.nox/unit-3-10/lib/python3.10/site-packages/google/protobuf/descriptor.py:158: in _GetFeatures
    self._LazyLoadOptions()
.nox/unit-3-10/lib/python3.10/site-packages/google/protobuf/descriptor.py:205: in _LazyLoadOptions
    features = self._ResolveFeatures(
.nox/unit-3-10/lib/python3.10/site-packages/google/protobuf/descriptor.py:180: in _ResolveFeatures
    unresolved.CopyFrom(raw_options.features)
.nox/unit-3-10/lib/python3.10/site-packages/google/protobuf/internal/python_message.py:744: in getter
    field_value = field._default_constructor(self)
.nox/unit-3-10/lib/python3.10/site-packages/google/protobuf/internal/python_message.py:450: in MakeSubMessageDefault
    message_factory.GetMessageClass(message_type)
.nox/unit-3-10/lib/python3.10/site-packages/google/protobuf/message_factory.py:50: in GetMessageClass
    return _InternalCreateMessageClass(descriptor)
E   RecursionError: maximum recursion depth exceeded while calling a Python object
!!! Recursion detected (same locals & position)

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions