On Fri, Oct 3, 2014 at 1:29 PM, Manpreet Kaur
Hi! I am new to pywikibot and have been going through
installation/contribution articles. I have two questions:
1. What is the difference b/w pywikibot-core/compat and core/compat? Do i
need to install both?
Repeating what Amir and Fabian have said...
It is a good idea to clone both the compat and core repos.
Also be aware that pywikibot-core has a subdirectory
'pywikibot/compat', which is a part of pywikibot-core intended to
assist old pywikipedia (i.e. 1.0) scripts to run on pywikibot (i.e.
2. I wish to fix the bug 57995 - Add function for
list=watchlistraw. On the
. A couple of patches
have been uploaded but I cant view the given links. Also, I am assuming that
I need to continue where others left but how do I know what parts of the
bugs have been fixed?
Gerrit 100363 added a _script_ called 'watchlist.py'.
Firstly, it has one major problem: it uses an uncached API call (line
89-90) and performs its own caching (line 102-7). As the watchlist
can be very large, constantly refetching the watchlist from the server
is not a good idea.
In pywikipedia (v1.0), the software was built with lots of scripts
(like watchlist.py) providing critical tasks, and each script was
written a different way. Therefore caching of data in watchlist.py is
using its own strategy. In pywikibot (2.0), CachedRequest was added,
so all MediaWIki API responses may be cached in a uniform manner.
So we have bug 68988: "watchlist.py should use CachedRequest"
Using CachedRequest instead of Request only requires the addition of
an expiry parameter, so that part should be very simple.
A more significant improvement is that the watchlist functionality
should be part of the library , i.e. part of the APISite class, which
is in pywikibot/site.py . That is what bug 57995 has requested. That
involves moving some of the code from scripts/watchlist.py to
pywikibot/site.py, and rewriting it to be consistent with other
For bonus points, the cached watchlist data should be invalidated when
a new page is added to the watchlist via Page.save / Page.watch. See
A really difficult improvement, which may not be desirable in many
cases (e.g. small watchlists), and may not be worth the overhead &
support costs: instead of invalidating the cached watchlist data,
pywikibot could update the cached list of watchlisted pages on the
I recommend that you join the IRC channel (
) to chat with other
devs, who can help you get started, and discuss design decisions with