[Pywikipedia-l] [ pywikipediabot-Bugs-1851933 ] Bug in catlib.py (Problems with caching-mechanism)

SourceForge.net noreply at sourceforge.net
Sun Dec 16 18:23:16 UTC 2007


Bugs item #1851933, was opened at 2007-12-16 19:49
Message generated for change (Comment added) made by rotemliss
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1851933&group_id=93107

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: 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: Rotem Liss (rotemliss)
Date: 2007-12-16 20: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 20: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&group_id=93107



More information about the Pywikipedia-l mailing list