Last modified: 2014-07-26 16:52:55 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T70564, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 68564 - textlib.categoryFormat() only works for site specified by config or command line
textlib.categoryFormat() only works for site specified by config or command line
Status: RESOLVED FIXED
Product: Pywikibot
Classification: Unclassified
textlib.py (Other open bugs)
core-(2.0)
All All
: Unprioritized critical
: ---
Assigned To: Ricordisamoa
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-25 10:57 UTC by John Mark Vandenberg
Modified: 2014-07-26 16:52 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description John Mark Vandenberg 2014-07-25 10:57:58 UTC
textlib.categoryFormat() only works when the categories are on the same site as config.family/config.mylang

The breakage was introduced with:

https://gerrit.wikimedia.org/r/#/c/147845/

Which caused the ar:wikipedia and test:wikidata travis builds to break
https://travis-ci.org/wikimedia/pywikibot-core/jobs/30527485

FAIL: test_category_format_Page (__main__.TestFormatFunctions)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/textlib_tests.py", line 130, in test_category_format_Page
    textlib.categoryFormat(data, self.site))
AssertionError: u'[[Category:Cat1]]\n[[Category:Cat2]]\n' != u'[[en:Category:Cat1]]\n[[en:Category:Cat2]]\n'
- [[Category:Cat1]]
+ [[en:Category:Cat1]]
?   +++
- [[Category:Cat2]]
+ [[en:Category:Cat2]]
?   +++

I have tested both of these proposed changes, and neither fixes this breakage:
https://gerrit.wikimedia.org/r/#/c/147860/
https://gerrit.wikimedia.org/r/#/c/148553/
Comment 1 Gerrit Notification Bot 2014-07-25 21:52:13 UTC
Change 149455 had a related patch set uploaded by Ricordisamoa:
convert non-string items to Category objects in textlib.categoryFormat()

https://gerrit.wikimedia.org/r/149455
Comment 2 Gerrit Notification Bot 2014-07-26 06:28:06 UTC
Change 149455 merged by jenkins-bot:
convert non-string items to Category objects in textlib.categoryFormat()

https://gerrit.wikimedia.org/r/149455
Comment 3 Amir Ladsgroup 2014-07-26 16:52:55 UTC
the patch merged and the tests seems okay on this. I close this bug, feel free to reopen if you think it still happens

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links