misza13(a)svn.wikimedia.org ha scritto:
> + if result.has_key('query-continue'):
Dictionary has_key() is deprecated.
if 'query-continue' in result:
--
Francesco Cosoleto
"Resteranno però gli altri Achei lunghi capelli,
finché abbatteremo Troia: e se pure questi...
ma sì, sulle navi fuggite verso la patria terra!
Noi due, Stènelo e io, lotteremo, fino a che il termine
fatale d'Ilio troviamo, perché con nume propizio venimmo." (Omero)
mfarag(a)svn.wikimedia.org ha scritto:
> Revision: 6971
> Author: mfarag
> Date: 2009-06-17 23:42:45 +0000 (Wed, 17 Jun 2009)
>
> Log Message:
> -----------
> Update ar
>
> Modified Paths:
> --------------
> trunk/pywikipedia/speedy_delete.py
>
> Modified: trunk/pywikipedia/speedy_delete.py
> ===================================================================
> --- trunk/pywikipedia/speedy_delete.py 2009-06-17 23:35:40 UTC (rev 6970)
> +++ trunk/pywikipedia/speedy_delete.py 2009-06-17 23:42:45 UTC (rev 6971)
> @@ -175,6 +175,7 @@
> 'zu': u'Category:Candidates for speedy deletion',
> },
> 'wikinews':{
> + 'ar': u'تصنيف:صفحات حذف سريع',
Please, don't use tabs...
--
Francesco Cosoleto
"Resteranno però gli altri Achei lunghi capelli,
finché abbatteremo Troia: e se pure questi...
ma sì, sulle navi fuggite verso la patria terra!
Noi due, Stènelo e io, lotteremo, fino a che il termine
fatale d'Ilio troviamo, perché con nume propizio venimmo." (Omero)
that should be
output(u'Your bot account does not have the global bot flag, checking
local flag.') instead of
output(u'Your bot account does not have global the bot flag, checking
local flag.')
Greetings
Hannes
2009/6/9 <purodha(a)svn.wikimedia.org>:
> Revision: 6947
> Author: purodha
> Date: 2009-06-09 18:40:41 +0000 (Tue, 09 Jun 2009)
>
> Log Message:
> -----------
> (r6946) Fix several typos.
> (r6943) Add forgotten comments, and parameters.
>
> Modified Paths:
> --------------
> trunk/pywikipedia/wikipedia.py
>
> Modified: trunk/pywikipedia/wikipedia.py
> ===================================================================
> --- trunk/pywikipedia/wikipedia.py 2009-06-09 18:22:04 UTC (rev 6946)
> +++ trunk/pywikipedia/wikipedia.py 2009-06-09 18:40:41 UTC (rev 6947)
> @@ -4885,12 +4885,12 @@
> globalRights = globalRights.split('","')
> self._rights[index] = globalRights
> if self._isLoggedIn[index]:
> - if 'Global_bot' in globalRights: # This account had global bot flag, no need to check local flags.
> + if 'Global_bot' in globalRights: # This account has the global bot flag, no need to check local flags.
> checkLocal = False
> else:
> - output(u'Your bot account does not have global bot flag, checking local flag.')
> + output(u'Your bot account does not have global the bot flag, checking local flag.')
> else:
> - if verbose: output(u'Note:this language does not allowed global bot.')
> + if verbose: output(u'Note: this language does not allow global bots.')
> if m and checkLocal:
> rights = m.group(1)
> rights = rights.split('", "')
> @@ -5358,7 +5358,7 @@
> if not repeat:
> break
>
> - def recentchanges(self, number = 100, rcstart = None, rcend = None, rcshow = None, rctype ='edit|new', repeat = False):
> + def recentchanges(self, number = 100, rcstart = None, rcend = None, rcshow = None, rctype ='edit|new', namespace=None, includeredirects=True, repeat = False):
> """
> Yield ImagePages from APIs, call: action=query&list=recentchanges&rctype=edit|new&rclimit=500
>
> @@ -5370,6 +5370,9 @@
> rcdir - In which direction to enumerate.
> One value: newer, older
> Default: older
> + rcnamespace - Filter log entries to only this namespace(s)
> + Values (separate with '|'):
> + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
> rcprop - Include additional pieces of information
> Values (separate with '|'):
> user, comment, flags, timestamp, title, ids, sizes,
>
>
>
> _______________________________________________
> Pywikipedia-svn mailing list
> Pywikipedia-svn(a)lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/pywikipedia-svn
>
Hello
2009/6/16 <siebrand(a)svn.wikimedia.org>:
> Revision: 6962
> Author: siebrand
> Date: 2009-06-15 19:27:07 +0000 (Mon, 15 Jun 2009)
>
> Log Message:
> -----------
> Update of 'redirect' magic words, based on current svn, including fallback.
[snip]
>
> -# 'it': magic words "RINVIA" and "RINVIO" appear in the MediaWiki
> -# source code, BUT DO NOT WORK
> + 'it': [u'rinvia', u'rinvio'],
Do you use some kind of automated tool to do this?
I know that this is painful, but I would rather *not* update
automatically redirects basing ourselves on SVN.
The WMF wikis use different settings, and inserting wrong redirects is
much, much, much more troublesome than not detecting some magic words.
(yes, you could say that magic words should get overriden in
wikipedia_family to fit WMF configuration, but the fact is that after
this commit, pywp is broken on WMF wikis :) )
I'll revert this massively for now, hoping for a nicer solution,
because I can't manually test all redirect keywords.
--
Nicolas Dumazet — NicDumZ [ nɪk.d̪ymz ]
Hello!
2009/6/17 <misza13(a)svn.wikimedia.org>:
> Revision: 6967
> Author: misza13
> Date: 2009-06-16 21:18:20 +0000 (Tue, 16 Jun 2009)
>
> Log Message:
> -----------
> Replacing getReferences() call with a more reliable API wrapper.
>
Sorry, content of the change looks fine. But can we avoid doing this?
For one, it does not work if the target wiki does not use API, and
this behavior is undocumented.
For two, we have a rewrite branch. Which is API only. If you're
willing to work on API-based tools, can you help us on that branch
instead of merely duplicating our work (mostly Russel's, in fact)?
Adding API features in trunk/ is _not_ helpful.
--
Nicolas Dumazet — NicDumZ [ nɪk.d̪ymz ]
Francesco Cosoleto (cosoleto at gmail.com) wrote at Fri Jun 12 15:48:13 UTC
2009:
> Proper procedure should be this (for non-trivial changes or files
> created by you self, common-sense based):
>
> 1. Post patch in mailing-list (I prefer here instead of using the stupid
> patch tracker).
The patch tracker is for use by *all* developers. Patches should be posted
there, regardless of what an individual prefers.
Recently, I had the pleasure of using the Twisted python framework for a
project... so it got me thinking whether it might be beneficial to
re-develop Pywikipedia on the Twisted framework. One of the advantages I
see with this is that the Twisted framework is asynchronous type of
framework and by using the Twisted framework, you could technically queue
and defer your requests where it would fire off your bot requests a lot more
efficiently. Rather than waiting and processing one page at a time for a
task, Twisted could technically handle multiple ones in a limiting fashion
using their system of callbacks and defers. Anyway, just a thought, I
wanted to see what people thought about it.
- Jason Lee
AKA [[en:w:AllyUnion]]
currently, some old methods still remain in the rewrite branch, for
backward-compatibility.
but i think as a *rewrite* version, such methods can be removed, or
replaced with new methods and properties,
to make new code cleaner.
also, for convinence, we can provide some simple wrapper classes, which map
old methods to new ones.
and put them in some package such as pywikibot.wrappers.*. for example,
pywikibot.wrappers.Page.
try to make them have the same interfaces as old version (trunk version?).
and this may make porting old scripts easier (just by writing from pywikibot
import wrappers as wikipedia etc.).
※ 引述《"Francesco Cosoleto" <cosoleto(a)gmail.com>》之郵件內容:
>First of all, you, Alex, should try to resolve pending problems about
>your previous commits. Anyway...
>
>alexsh(a)svn.wikimedia.org ha scritto:
>> Revision: 6950
>> Author: alexsh
>> Date: 2009-06-11 16:46:35 +0000 (Thu, 11 Jun 2009)
>>
>> Log Message:
>> -----------
>> Fix:cannot locate password files if running script in subfolder
>
>"login.py: Open password file even if the script haven't run from base
>directory"?
>
It is running from "current directory" in the command console,
and I found this when I cleanout old login data and run maintenance\readtalk.py.
And I just revert login.py and run in sub folder (using "..\login.py"),
it cannot locate passfile, too.
>[...]
>> Log Message:
>> -----------
>> Typo: cannot use double slash in unix...XDrz
>
>...And what "XDrz" stand for?
>
Nothing...it just a emoticon with XD and Orz..I always using.
>3 consecutive commits for a bugfix aren't so much good.
>
>Proper procedure should be this (for non-trivial changes or files
>created by you self, common-sense based):
>
>1. Post patch in mailing-list (I prefer here instead of using the stupid
>patch tracker).
>
>A message like:
>
>Subject: [PATCH] Descriptive title
>
>Optional long description or commit message
>
>[patch attached]
>
>2. Wait for comments
>
>3. If changes are required, post again a new patch
>
>4. See 2, then commit.
Well, I think you're right, some bugfix need to test and proof it before commit to svn.
>
>
>--
>Francesco Cosoleto
russblau(a)svn.wikimedia.org ha scritto:
> Revision: 6954
> Author: russblau
> Date: 2009-06-11 20:24:06 +0000 (Thu, 11 Jun 2009)
>
> Log Message:
> -----------
> Add 'step' and 'total' parameters to all applicable Page methods
>
> - to the Site object.
> + to the Site object.
[...]
> - elif isinstance(source, Page):
> + elif isinstance(source, Page):
> # copy all of source's attributes to this object
[...]
Please don't mix cosmetic changes with functional changes.
--
Francesco Cosoleto
What gets us into truoble is not what we don't know. It's what we know
for sure that just ain't so. (Mark Twain)