Skip to content

With warnings enabled, python complains about unclosed sqlite connection (ResourceWarning) #860

@hannob

Description

@hannob

When running urlwatch with Pytthon warnings enabled, it will show a ResourceWarning with various commands (e.g., --edit, --test-filter) complaining that the database connection has not been closed.

Example commands:

PYTHONWARNINGS=d urlwatch --edit
PYTHONWARNINGS=d urlwatch --test-filter 1

Output at the end:

<sys>:0: ResourceWarning: unclosed database in <sqlite3.Connection object at 0x742d6ebf3880>
ResourceWarning: Enable tracemalloc to get the object allocation traceback

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