Skip to content

Bad advice in DeprecationWarning about sqlite3 datetime adapter #135834

Open
@helmutg

Description

@helmutg

When using the datetime adapter of sqlite3, you'll get:

DeprecationWarning: The default datetime adapter is deprecated as of Python 3.12; see the sqlite3 documentation for suggested replacement recipes

The relevant documentation likely is located at https://docs.python.org/3/library/sqlite3.html#default-adapters-and-converters-deprecated

The suggested recipe likely is https://docs.python.org/3/library/sqlite3.html#sqlite3-adapter-converter-recipes

This recipe suggests modifying global state in the sqlite3 module. This is a no-go for libraries as two libraries registering adapters would quickly run into a conflict.

Please offer a recipe suitable for use in libraries or undeprecate the default adapters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    No status

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions