77 NotSupportedError , ProgrammingError )
88
99from .log import logger
10- from .utils import create_future
1110
1211
1312# https://github.com/PyMySQL/PyMySQL/blob/master/pymysql/cursors.py#L11-L18
@@ -362,15 +361,15 @@ async def callproc(self, procname, args=()):
362361 def fetchone (self ):
363362 """Fetch the next row """
364363 self ._check_executed ()
365- fut = create_future ( self ._loop )
364+ fut = self ._loop . create_future ( )
366365
367366 if self ._rows is None or self ._rownumber >= len (self ._rows ):
368367 fut .set_result (None )
369368 return fut
370369 result = self ._rows [self ._rownumber ]
371370 self ._rownumber += 1
372371
373- fut = create_future ( self ._loop )
372+ fut = self ._loop . create_future ( )
374373 fut .set_result (result )
375374 return fut
376375
@@ -386,7 +385,7 @@ def fetchmany(self, size=None):
386385 :returns: ``list`` of fetched rows
387386 """
388387 self ._check_executed ()
389- fut = create_future ( self ._loop )
388+ fut = self ._loop . create_future ( )
390389 if self ._rows is None :
391390 fut .set_result ([])
392391 return fut
@@ -403,7 +402,7 @@ def fetchall(self):
403402 :returns: ``list`` of fetched rows
404403 """
405404 self ._check_executed ()
406- fut = create_future ( self ._loop )
405+ fut = self ._loop . create_future ( )
407406 if self ._rows is None :
408407 fut .set_result ([])
409408 return fut
@@ -443,7 +442,7 @@ def scroll(self, value, mode='relative'):
443442 raise IndexError ("out of range" )
444443 self ._rownumber = r
445444
446- fut = create_future ( self ._loop )
445+ fut = self ._loop . create_future ( )
447446 fut .set_result (None )
448447 return fut
449448
0 commit comments