You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SqliteCache uses deprecated sqlite3 datetime adapters and fails on whole-second timestamps #1507
Zeep version: 4.3.3 (current main, 1b7072c). No WSDL needed, it's just the cache.
SqliteCache relies on sqlite3's default datetime adapter and timestamp converter. Those are deprecated since Python 3.12, so every cache read and write emits a DeprecationWarning. The converter also can't parse what the adapter writes when the timestamp lands on a whole second: isoformat() drops the microseconds, the stored value looks like 2026-11-15 09:00:00+00:00, and get() raises ValueError. It's rare, but once it happens that URL keeps failing to load until the row is replaced.
importdatetime, os, tempfileimportfreezegunfromzeepimportcachec=cache.SqliteCache(path=os.path.join(tempfile.mkdtemp(), "cache.db"))
withfreezegun.freeze_time(datetime.datetime(2026, 11, 15, 9, 0, 0, tzinfo=datetime.timezone.utc)):
c.add("http://example.com/service.wsdl", b"content")
c.get("http://example.com/service.wsdl")
# ValueError: invalid literal for int() with base 10: b'00+00'
I've got a fix that stores the timestamp as ISO text and parses it with datetime.fromisoformat, which also reads rows written by older versions. I'll open a PR.
Activity