Remove py27 support from Python sources. (#394)

This commit is contained in:
Bastien Vallet
2019-11-28 14:04:42 +01:00
committed by Inada Naoki
parent 5811678dea
commit 026e87f7b5
11 changed files with 23 additions and 65 deletions

View File

@ -35,7 +35,6 @@ from decimal import Decimal
from MySQLdb._mysql import string_literal, escape
from MySQLdb.constants import FIELD_TYPE, FLAG
from MySQLdb.times import *
from MySQLdb.compat import PY2, long, unicode
from MySQLdb._exceptions import ProgrammingError
NoneType = type(None)
@ -85,11 +84,10 @@ def array2Str(o, d):
return Thing2Literal(o.tostring(), d)
# bytes or str regarding to BINARY_FLAG.
_bytes_or_str = ((FLAG.BINARY, bytes), (None, unicode))
_bytes_or_str = ((FLAG.BINARY, bytes), (None, str))
conversions = {
int: Thing2Str,
long: Thing2Str,
float: Float2Str,
NoneType: None2NULL,
ArrayType: array2Str,