Bugs item #3474195, was opened at 2012-01-15 08:26
Message generated for change (Comment added) made by binbot
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=347419…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: category
Group: None
Status: Open
Resolution: None
Priority: 3
Private: No
Submitted By: xqt (xqt)
Assigned to: Nobody/Anonymous (nobody)
Summary: category.py mistakenty removes not affected categories
Initial Comment:
Pywikipedia trunk/pywikipedia/ (r9826, 2011/10/30, 15:03:29)
Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)]
config-settings:
use_api = True
use_api_login = True
unicode test: ok
I found some categories removed on template which are not affected by the command line:
category.py remove -from:Kategorie:Vorlage:mit_Einzelnachweisen
Here is a sample:
http://de.wikipedia.org/w/index.php?title=Vorlage%3AInfobox_Gemeindeverband…
cosmetic_changes was switched off.
----------------------------------------------------------------------
Comment By: Bináris (binbot)
Date: 2012-02-02 23:55
Message:
I made some experiments. I think the problem is in textlib.py.
replaceCategoryLinks calls removeCategoryLinksAndSeparator
I suspect that removeCategoryLinksAndSeparator removes these categories but
nobody puts them back because they are not explicitely listed as
categories.
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2012-01-15 11:47
Message:
I changed the behavour of catlib.change_category(). Categories of templates
always are always replaced by wikipedia.replaceCategoryInPlace() rather
than by wikipedia.replaceCategoryLinks().
The bug ist still remainig for some circumstances: Page.categories() gives
categories via api whereas replaceCategoryLinks() works like
wikipedia.getCategoryLinks() which is quite different.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=347419…