Skip to content

Turning on debug while using context manager for channel results in TypeError #2422

@FSuman

Description

@FSuman

Hello,

If I turn on debug via declaring KOMBU_LOG_DEBUG=1, the channel that was wrapped with Logwrapped fails with the following message:

TypeError: 'Logwrapped' object does not support the context manager protocol

I got it working locally by declaring __enter__ and __exit__ methods and returning self.instance.__enter__() and self.instance.__exit__(...)

This is on Python 3.13, but also reproduced in Python 3.11

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