Skip to content

Discourage inheritance from some aiohttp classes #2691

Closed
@asvetlov

Description

In first line I see web.Application and ClientSession.
If user want to extend functionality -- I'd like to encourage aggregation, not inheritance.

It could be done easy by adding __subclass_init__ thunder method, the method should generate a warning (UserWarning maybe).
The method is not called by Python 3.5 (but not generates a error too), on Python 3.6+ everything should work fine. Who cares about Python 3.5?

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions