Skip to content

Exception ignored in: <function Connection.__del__ at ...> TypeError: 'ABCMeta' object does not support the context manager protocol. #63

@fdcastel

Description

@fdcastel

Related #51.

@pcisar Looks like there is still a problem with this. The current code:

            with contextlib.suppress:
                self._att.detach()

causes:

Exception ignored in: <function Connection.__del__ at 0x000001F220A48400>
Traceback (most recent call last):
  File "C:\Temp\dwdb-workspace\dwdb\.venv\Lib\site-packages\firebird\driver\core.py", line 1802, in __del__
    with contextlib.suppress:
TypeError: 'ABCMeta' object does not support the context manager protocol

It needs to be adjusted to:

            with contextlib.suppress(DatabaseError):
                self._att.detach()

This correctly suppresses the exception and doesn't display the Exception ignored message.

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