Skip to content

Naming collision with variable for field headers #1177

@parthea

Description

@parthea

The generated client for datastream v1 here has failing unit tests. The issue is that the variable used for field headers is not disambiguated. See here where a reserved keyword object is used.

In googleapis/python-datastream#61, the unit tests fail with AttributeError`

        try:
            pb_type = self._meta.fields[key].pb_type
            pb_value = getattr(self._pb, key)
            marshal = self._meta.marshal
            return marshal.to_python(pb_type, pb_value, absent=key not in self)
        except KeyError as ex:
>           raise AttributeError(str(ex))
E           AttributeError: 'object'

.nox/unit-3-7/lib/python3.7/site-packages/proto/message.py:615: AttributeError

See build log here.

Metadata

Metadata

Assignees

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