8000 Custom __dir__ in 1.20.0 breaks when called on 'Message' instead of subclass · Issue #296 · googleapis/proto-plus-python · GitHub 8000
[go: up one dir, main page]

Skip to content

Custom __dir__ in 1.20.0 breaks when called on 'Message' instead of subclass #296

@saggitar

Description

@saggitar

Environment details

  • Programming language: Python
  • OS: Arch Linux (Kernel: Linux 5.16.5-arch1-1, Architecture: x86-64)
  • Language runtime version: tested with 3.8, 3.9, 3.10
  • Package version: 1.20.0

Steps to reproduce

  1. Install new proto-plus version
  2. >>> import proto.message
    >>> dir(proto.message.Message)
    [...]
    AttributeError: type object 'Message' has no attribute '_meta'
    

_meta is only set when new proto.message.Message types are creat 60BF ed, so __dir__ does not work on
proto.message.Message itself.
In this case __dir__ should probably fall back to object.__dir__ as it was implicitly the case in previous versions.

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

      0