diff --git a/MySQLdb/connections.py b/MySQLdb/connections.py index 11b996d4..27a04770 100644 --- a/MySQLdb/connections.py +++ b/MySQLdb/connections.py @@ -5,10 +5,9 @@ override Connection.default_cursor with a non-standard Cursor class. """ import re -import sys -from MySQLdb import cursors, _mysql -from MySQLdb._exceptions import ( +from . import cursors, _mysql +from ._exceptions import ( Warning, Error, InterfaceError, DataError, DatabaseError, OperationalError, IntegrityError, InternalError, NotSupportedError, ProgrammingError, diff --git a/MySQLdb/cursors.py b/MySQLdb/cursors.py index 056bb542..cb461905 100644 --- a/MySQLdb/cursors.py +++ b/MySQLdb/cursors.py @@ -3,14 +3,9 @@ This module implements Cursors of various types for MySQLdb. By default, MySQLdb uses the Cursor class. """ -from functools import partial import re -import sys -from ._exceptions import ( - Warning, Error, InterfaceError, DataError, - DatabaseError, OperationalError, IntegrityError, InternalError, - NotSupportedError, ProgrammingError) +from ._exceptions import ProgrammingError #: Regular expression for :meth:`Cursor.executemany`.