From e883719eef93fc5eceaff027725023b3fbee8a9b Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Mon, 19 Sep 2022 16:08:14 +0900 Subject: [PATCH] Raise ProgrammingError on -inf --- MySQLdb/converters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MySQLdb/converters.py b/MySQLdb/converters.py index 33f22f74..d6fdc01c 100644 --- a/MySQLdb/converters.py +++ b/MySQLdb/converters.py @@ -72,7 +72,7 @@ def Thing2Str(s, d): def Float2Str(o, d): s = repr(o) - if s in ("inf", "nan"): + if s in ("inf", "-inf", "nan"): raise ProgrammingError("%s can not be used with MySQL" % s) if "e" not in s: s += "e0"