Xqt added a comment.
In T279753#6986869 <https://phabricator.wikimedia.org/T279753#6986869>, @Vladis13 wrote: > Was Pwb 3.0.dev0 (this version number did not change until this year for several years, although Pwb itself was regularly updated, probably it was a bug) → 6.0.1 Your traceback is surely Pywikibot 6.0.1 (stable). Anyway I can reproduce it: >>> import pymysql >>> from contextlib import closing >>> connection = pymysql.connect(defer_connect=True) >>> connection = closing(connection) >>> with connection as conn, conn.cursor() as cursor: pass >>> connection = pymysql.connect(defer_connect=True) >>> with connection as conn, conn.cursor() as cursor: pass Traceback (most recent call last): File "<pyshell#8>", line 1, in <module> with connection as conn, conn.cursor() as cursor: AttributeError: 'Cursor' object has no attribute 'cursor' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<pyshell#8>", line 2, in <module> pass File "C:\Python39\lib\site-packages\pymysql\connections.py", line 503, in __exit__ self.rollback() File "C:\Python39\lib\site-packages\pymysql\connections.py", line 429, in rollback self._execute_command(COMMAND.COM_QUERY, "ROLLBACK") File "C:\Python39\lib\site-packages\pymysql\connections.py", line 750, in _execute_command raise err.InterfaceError("(0, '')") pymysql.err.InterfaceError: (0, '') >>> connection is not a context manager if pymysql < 1.0.0 TASK DETAIL https://phabricator.wikimedia.org/T279753 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Xqt Cc: JJMC89, Xqt, Aklapper, pywikibot-bugs-list, Vladis13, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista
_______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
