Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 74c16e7

Browse filesBrowse files
authored
Remove unused converters (PyMySQL#315)
1 parent 8ad1525 commit 74c16e7
Copy full SHA for 74c16e7

File tree

Expand file treeCollapse file tree

1 file changed

+0
-10
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+0
-10
lines changed

‎MySQLdb/converters.py

Copy file name to clipboardExpand all lines: MySQLdb/converters.py
-10Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,6 @@ def Thing2Str(s, d):
5959
"""Convert something into a string via str()."""
6060
return str(s)
6161

62-
def Unicode2Str(s, d):
63-
"""Convert a unicode object to a string using the default encoding.
64-
This is only used as a placeholder for the real function, which
65-
is connection-dependent."""
66-
return s.encode()
67-
6862
def Float2Str(o, d):
6963
s = repr(o)
7064
if s in ('inf', 'nan'):
@@ -90,9 +84,6 @@ def Decimal2Literal(o, d):
9084
def array2Str(o, d):
9185
return Thing2Literal(o.tostring(), d)
9286

93-
def quote_tuple(t, d):
94-
return "(%s)" % (','.join(escape_sequence(t, d)))
95-
9687
# bytes or str regarding to BINARY_FLAG.
9788
_bytes_or_str = ((FLAG.BINARY, bytes), (None, unicode))
9889

@@ -106,7 +97,6 @@ def quote_tuple(t, d):
10697
Date: Thing2Literal,
10798
DateTimeType: DateTime2literal,
10899
DateTimeDeltaType: DateTimeDelta2literal,
109-
str: Thing2Literal, # default
110100
set: Set2Str,
111101
Decimal: Decimal2Literal,
112102

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.