[issue45677] [doc] improve sqlite3 docs

2021-11-21 Thread Ian Fisher
Ian Fisher added the comment: I think it would also be helpful to make the examples at the top simpler/more idiomatic, e.g. using a context manager for the connection and calling conn.execute directly instead of spawning a cursor. I think the information about the isolation_level parameter

[issue26651] Deprecate register_adapter() and register_converter() in sqlite3

2021-11-21 Thread Ian Fisher
Ian Fisher added the comment: See bpo-45858 for a more limited proposal to only deprecate the default converters. -- ___ Python tracker <https://bugs.python.org/issue26

[issue45858] Deprecate default converters in sqlite3

2021-11-21 Thread Ian Fisher
Ian Fisher added the comment: See also bpo-26651 for a related proposal to deprecate the converter/adapter infrastructure entirely. The proposal in this bug is more limited: remove the default converters (though I think the default adapters should stay), but continue to allow users

[issue45858] Deprecate default converters in sqlite3

2021-11-21 Thread Ian Fisher
New submission from Ian Fisher : Per discussion at https://discuss.python.org/t/fixing-sqlite-timestamp-converter-to-handle-utc-offsets/, the default converters in SQLite3 have several bugs and are probably not worth continuing to maintain, so I propose deprecating them and removing them

[issue45335] Default TIMESTAMP converter in sqlite3 ignores UTC offset

2021-10-24 Thread Ian Fisher
Change by Ian Fisher : -- keywords: +patch pull_requests: +27469 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29200 ___ Python tracker <https://bugs.python.org/issu

[issue19065] sqlite3 timestamp adapter chokes on timezones

2021-10-07 Thread Ian Fisher
Change by Ian Fisher : -- nosy: +iafisher ___ Python tracker <https://bugs.python.org/issue19065> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26651] Deprecate register_adapter() and register_converter() in sqlite3

2021-10-07 Thread Ian Fisher
Change by Ian Fisher : -- nosy: +iafisher ___ Python tracker <https://bugs.python.org/issue26651> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45335] Default TIMESTAMP converter in sqlite3 ignores UTC offset

2021-10-05 Thread Ian Fisher
Ian Fisher added the comment: Okay, I started a discussion here: https://discuss.python.org/t/fixing-sqlite-timestamp-converter-to-handle-utc-offsets/10985 -- ___ Python tracker <https://bugs.python.org/issue45

[issue45335] Default TIMESTAMP converter in sqlite3 ignores UTC offset

2021-10-05 Thread Ian Fisher
Ian Fisher added the comment: > Another option could be to deprecate the current behaviour and then change it > to being timezone aware in Python 3.13. This sounds like the simplest option. I'd be interested in working on this myself, if you think it's something that a new C

[issue45335] Default TIMESTAMP converter in sqlite3 ignores UTC offset

2021-10-04 Thread Ian Fisher
Ian Fisher added the comment: Unfortunately fixing this will have to be considered a backwards-incompatible change, since Python doesn't allow naive and aware datetime objects to be compared, so if sqlite3 starts returning aware datetimes, existing code might break. Alternatively, perhaps

[issue45335] Default TIMESTAMP converter in sqlite3 ignores time zone

2021-10-02 Thread Ian Fisher
Ian Fisher added the comment: Substitute "UTC offset" for "time zone" in my comment above. I have attached a minimal Python program demonstrating data loss from this bug. -- Added file: https://bugs.python.org/file50324/timestamp.py __

[issue45335] Default TIMESTAMP converter in sqlite3 ignores time zone

2021-09-30 Thread Ian Fisher
New submission from Ian Fisher : The SQLite converter that the sqlite3 library automatically registers for TIMESTAMP columns (https://github.com/python/cpython/blob/main/Lib/sqlite3/dbapi2.py#L66) ignores the time zone even if it is present and always returns a naive datetime object. I