Bug #76181 | ReferenceError: weakly-referenced object no longer exists | ||
---|---|---|---|
Submitted: | 5 Mar 2015 19:30 | Modified: | 3 Aug 2022 15:14 |
Reporter: | Trevor Carlson | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / Python | Severity: | S4 (Feature request) |
Version: | 2.0.3 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[5 Mar 2015 19:30]
Trevor Carlson
[17 Jul 2015 10:00]
Andrii Nikitin
I don't think that current behavior may be claimed to be a bug. But since the suggestion looks relevant, I verified it as 'Feature Request'.
[17 Jul 2015 17:12]
Trevor Carlson
For reference, my perspective here is that "weakly-referenced object no longer exists" is not a useful error message. I encountered it while converting some old code, and tracking down the issue was much harder than it would have been if the error had been "Cursor is not connected" or similar.
[3 Aug 2022 15:14]
Philip Olson
Posted by developer: Fixed as of the upcoming MySQL Connector/Python 8.0.31 release, and here's the proposed changelog entry from the documentation team: Destroying a connection object now raises a ProgrammingError exception stating the cursor is not connected. Before it raised a ReferenceError exception about weakly-referenced objects, which related to how cursors contain a weak reference to the connection. Thank you for the bug report.