8000 Raise ProgrammingError on -inf in addition to inf (#1067) · PyMySQL/PyMySQL@e77b218 · GitHub
[go: up one dir, main page]

Skip to content

Commit e77b218

Browse files
cdcadmanChuck Cadman
and
Chuck Cadman
authored
Raise ProgrammingError on -inf in addition to inf (#1067)
Co-authored-by: Chuck Cadman <charles.cadman@standard.com>
1 parent dd47caa commit e77b218

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pymysql/converters.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def escape_int(value, mapping=None):
5656

5757
def escape_float(value, mapping=None):
5858
s = repr(value)
59-
if s in ("inf", "nan"):
59+
if s in ("inf", "-inf", "nan"):
6060
raise ProgrammingError("%s can not be used with MySQL" % s)
6161
if "e" not in s:
6262
s += "e0"

0 commit comments

Comments
 (0)
0