[New-bugs-announce] [issue43752] Fetching an empty value from date column crashes on SQLite.

Mariusz Felisiak report at bugs.python.org
Tue Apr 6 14:29:34 EDT 2021


New submission from Mariusz Felisiak <felisiak.mariusz at gmail.com>:

We noticed a regression in Python3.10.0a7 (it works properly in Python3.10.0a6) when running Django's test suite. `convert_date()`[1] is called and crashes when fetching an empty value from `date` column on SQLite:

File "python3.10/lib/sqlite3/dbapi2.py", line 64, in convert_date
    return datetime.date(*map(int, val.split(b"-")))
ValueError: invalid literal for int() with base 10: b''

I will bisect a regression and submit PR.

[1] https://github.com/python/cpython/blob/50616223d1043f0f83534ffec38709439b8a49ab/Lib/sqlite3/dbapi2.py#L63-L64

----------
components: Library (Lib)
messages: 390357
nosy: berker.peksag, erlendaasland, felixxm
priority: normal
severity: normal
status: open
title: Fetching an empty value from date column crashes on SQLite.
type: behavior
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43752>
_______________________________________


More information about the New-bugs-announce mailing list