[CONPY-222] del cursor after cursor.close() raises exception Created: 2022-08-27  Updated: 2022-08-27  Resolved: 2022-08-27

Status: Closed
Project: MariaDB Connector/Python
Component/s: DBAPI 2.0
Affects Version/s: 1.1.4
Fix Version/s: 1.1.5

Type: Bug Priority: Major
Reporter: Georg Richter Assignee: Georg Richter
Resolution: Fixed Votes: 0
Labels: None

Python Version: 3.10

 Description   

When deleting a cursor via del cursor and the cursor was closed before, an exception will be thrown:

>>> import mariadb
>>> c=mariadb.connect()
>>> cursor=c.cursor()
>>> cursor.close()
>>> del cursor
Exception ignored in: <function Cursor._del_ at 0x7ff0136b8ee0>
mariadb.ProgrammingError: Cursor is closed

Same issue was reported on Stackoverflow


Generated at Thu Feb 08 03:31:09 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.