Skip to content

Double-underscore prefixed attributes break subclass access via name mangling #77

@ZLeventer

Description

@ZLeventer

Description

Several internal attributes use Python double-underscore (__) prefixes, which triggers Python's name-mangling mechanism. This means subclasses cannot access these attributes by their expected names, breaking extensibility.

In Python, self.__attr in class Foo gets mangled to self._Foo__attr, making it inaccessible as self.__attr from a subclass Bar.

Impact

Any user extending the client classes (a common pattern for adding custom auth, logging, or retry logic) will hit AttributeError when trying to access these attributes.

Suggested fix

Replace double-underscore prefixes with single-underscore (the Python convention for "internal but accessible"). See PR #71.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions