Page MenuHomePhabricator

script_tests.TestScriptHelp and script_tests.TestScriptSimulate are failing with "AssertionError: u'deprecated' unexpectedly found"
Closed, ResolvedPublic

Description

https://travis-ci.org/wikimedia/pywikibot-core/jobs/219760238

There are 51 errors in TestScriptSimulate and 76 errors in TestScriptHelp. The errors are mostly the same.

======================================================================

FAIL: test_wikisourcetext (tests.script_tests.TestScriptSimulate)

Test running wikisourcetext -simulate.

----------------------------------------------------------------------

Traceback (most recent call last):

  File "/home/travis/build/wikimedia/pywikibot-core/tests/script_tests.py", line 319, in testScript

    self.assertNotIn('deprecated', result['stderr'].lower())

AssertionError: u'deprecated' unexpectedly found in u'/home/travis/build/wikimedia/pywikibot-core/pywikibot/__init__.py:238: deprecationwarning: pywikibot.deprecate_arg is deprecated; use pywikibot.tools.deprecate_arg instead.\n  @deprecate_arg(\'entity\', \'globe_item\')\nerror: missing parameter(s) "-index"\nuse -help for further information.\n'

A recent usage of pywikibot.deprecate_arg has been in e54e5849dc3062bdcbe1cfceb15350a24e7875a7 (line 238).

Event Timeline

Change 347138 had a related patch set uploaded (by Dalba):
[pywikibot/core@master] pywikibot/__init__.py: Do not use deprecate_arg

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

Change 348203 had a related patch set uploaded (by Dalba):
[pywikibot/core@master] pywikibot/__init__.py: Remove deprecation of deprecate_arg

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

Xqt triaged this task as Medium priority.Apr 14 2017, 9:30 AM

Is the second patch replacing the first or should they be considered two alternative solutions?

Is the second patch replacing the first or should they be considered two alternative solutions?

Alternative solutions.

Change 347138 merged by jenkins-bot:
[pywikibot/core@master] pywikibot/__init__.py: Do not use deprecate_arg

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

Change 348203 abandoned by Xqt:
pywikibot/__init__.py: Remove deprecation of deprecate_arg

Reason:
pywikibot.deprecate_arg is deprecated, pywikibot.tools.deprecate_arg should be used instead.

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

Xqt claimed this task.