Page MenuHomePhabricator

The (type, exc, tb) signature of GeneratorWrapper.throw() is deprecated
Closed, ResolvedPublic

Description

The (type, exc, tb) signature of GeneratorWrapper.throw() is deprecated and the value parameter signature should be used only.

/home/runner/work/pywikibot/pywikibot/pywikibot/tools/collections.py:288: DeprecationWarning: the (type, exc, tb) signature of throw() is deprecated, use the single-arg signature instead.
  self._started_gen.throw(typ, val, tb)

A FutureWarning should be printed as long as the last Python version supports it and removed if it was droppen (maybe with Python 3.13 or 3.14)

Event Timeline

Xqt triaged this task as Medium priority.Jun 28 2023, 12:57 PM

Change #1197040 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] cleanup: deprecate old (type, value, traceback) signature in throw

https://gerrit.wikimedia.org/r/1197040

Change #1197040 merged by jenkins-bot:

[pywikibot/core@master] cleanup: deprecate old (type, value, traceback) signature in throw

https://gerrit.wikimedia.org/r/1197040