Bug #87818 PendingDeprecationWarning: generator 'MySQLCursor._execute_iter' raised StopIter
Submitted: 20 Sep 2017 12:34 Modified: 13 Sep 2018 21:08
Reporter: Ondrej Medek Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / Python Severity:S3 (Non-critical)
Version:2.2.2, 8.0.11 OS:Any
Assigned to: CPU Architecture:Any

[20 Sep 2017 12:34] Ondrej Medek
Description:
I've got
PendingDeprecationWarning: generator 'MySQLCursor._execute_iter' raised StopIteration

when iterate over the result of cursor.execute(...,multi=True). Please refactor the code to conform to the https://www.python.org/dev/peps/pep-0479/

How to repeat:
I use code:

result = cursor.execute(query, params, multi=True)
for r in result: # causes the warning
    ...
[7 Nov 2017 11:17] Chiranjeevi Battula
Hello Ondrej,

Thank you for the bug report.
Verified as described with the help of dev's.

Thanks,
Chiranjeevi.
[22 Apr 2018 23:35] Jason R. Coombs
This warning becomes an error in Python 3.7, rendering multi-result queries broken.
[4 Jun 2018 7:43] Chiranjeevi Battula
http://bugs.mysql.com/bug.php?id=91095 marked as duplicate of this one.
[4 Jun 2018 15:29] Nenad J
This entry should have been with marked as critical. For more details, better description and appropriate severity, please see  https://bugs.mysql.com/bug.php?id=91095
[13 Sep 2018 21:08] Philip Olson
The upcoming MySQL Connector/Python 8.0.13 release adds Python 3.7 support, which fixes this bug. 

Thank you for the bug report.