Skip to content

[BUG] Telegram classes with no custom __init__ are not frozen by default #3452

@harshil21

Description

@harshil21

Steps to Reproduce

  1. Initialize a class with no overriden __init__, e.g. VideoChatStarted
  2. do VideoChatStarted().api_kwargs = "something"

Expected behaviour

AttributeError should be raised

Actual behaviour

The attribute is set successfully.

Operating System

OS-agnostic

Version of Python, python-telegram-bot & dependencies

Python version agnostic
PTB - 20.0b0

Relevant log output

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions