Bugs item #1851933, was opened at 2007-12-16 14:49 Message generated for change (Settings changed) made by leogregianin You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1851933...
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: Closed Resolution: Fixed
Priority: 5 Private: No Submitted By: Bernhard Mayr (falk_steinhauer) Assigned to: Nobody/Anonymous (nobody) Summary: Bug in catlib.py (Problems with caching-mechanism)
Initial Comment: I detected a bug in catlib.py that is due to the caching-functionality. Line 132 (if not page in cache:) causes problems.
If an article is part of [[Category:A]] and [[Category:B]] and a script iterates over both categories, the article is not yielded by catB.articles() because it was cached during an earlier call of catA.articles().
It would be better if the call of catB.articles() really yields all articles in this category, because sometimes the plain names of the articles are of interest.
I did not fix the bug by myself, because I do not understand the caching-mechanism by now.
My view of the sources is on revision 4720 (updated today).
----------------------------------------------------------------------
Comment By: Russell Blau (russblau) Date: 2007-12-17 10:36
Message: Logged In: YES user_id=855050 Originator: NO
Fixed in r4722
----------------------------------------------------------------------
Comment By: Rotem Liss (rotemliss) Date: 2007-12-16 15:23
Message: Logged In: YES user_id=1327030 Originator: NO
Python seems to have some weird feature (or bug?) about default unused parameters: it keeps them for the next run. Will fix that soon.
----------------------------------------------------------------------
Comment By: Bernhard Mayr (falk_steinhauer) Date: 2007-12-16 15:08
Message: Logged In: YES user_id=1810075 Originator: YES
To solve my problem I put line 134 of catlib.py (yield ARTICLE, page) out of the if-block of line 132 (if not page in cache:).
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1851933...
pywikipedia-l@lists.wikimedia.org