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 63a72f5

Browse filesBrowse files
author
Adam Chainz
committed
connections.py use int not atoi
`atoi` is deprecated since python 2.0 and not in python 3. I guess this code is not being run since `_mysql.c` looks like it always defines `warning_count` anyway, but it should not sit around being python-3-incompatible.
1 parent 0aa9a53 commit 63a72f5
Copy full SHA for 63a72f5

File tree

Expand file treeCollapse file tree

1 file changed

+1
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-2
lines changed

‎MySQLdb/connections.py

Copy file name to clipboardExpand all lines: MySQLdb/connections.py
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,10 +325,9 @@ def begin(self):
325325
def warning_count(self):
326326
"""Return the number of warnings generated from the
327327
last query. This is derived from the info() method."""
328-
from string import atoi
329328
info = self.info()
330329
if info:
331-
return atoi(info.split()[-1])
330+
return int(info.split()[-1])
332331
else:
333332
return 0
334333

0 commit comments

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