From 8f0cbacba853f0328b839b742b32a0ebb0687b8e Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Tue, 20 Sep 2022 14:10:19 +0900 Subject: [PATCH] Raise ProgrammingError on -inf (#557) --- MySQLdb/converters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MySQLdb/converters.py b/MySQLdb/converters.py index 33f22f7..d6fdc01 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"