Patches item #1907586, was opened at 2008-03-05 02:14
Message generated for change (Comment added) made by nicdumz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1907586&group_…
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: None
Group: None
Status: Open
Resolution: None
Priority: 8
Private: No
Submitted By: Purodha B Blissenbach (purodha)
Assigned to: Nobody/Anonymous (nobody)
Summary: Make edit tokens dynamic in wikipedia.py
Initial Comment:
Edit tokens in wikpedia.py were effectively constants up to this patch. When a token was outdated, a new one was not obtained, and edit access to the site never functioned again until the program was restarted.
The problem is described in more detail in:
https://sourceforge.net/tracker/index.php?func=detail&aid=1903113&group_id=…
The attached patch makes tokens a bit more dynamic, it allows loading of new ones when an edit page requires.
I have tested the code, with interwiki-py only, for about 20 hours in manually assisted mode in 3, sometimes 4, parallel sessions in verbose mode. The altered branch was executed several dozen times, no problems seen.
Nevertheless, I recommend a review. I am not knowledgeable enough to be sure that there are no sideffects. I am not a python expert, so maybe, I made it too complicated. Also, though I did run few other pywikipediabot programs which were using the altered wikipdia.py without apaprent problems, that cannot be called a valid test.
----------------------------------------------------------------------
>Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-03-23 12:06
Message:
mmm sorry to take so long to review this... (whooa one year :/ ). No
excuses.
It seems that something is missing.
When entering _putpage the first time, newToken=0.
* Inside _putpage, newToken is never assigned a value.
* if newToken < 0, then a recursive call is made with newToken = newToken
+ 1 . That's the only possible call where newToken is changed.
If I get it right, whatever the workflow is, newToken will always be 0
Correct, or is it me?
If you're still motivated to code something Purodha, please update your
patch, I'll make sure to review it faster ;)
----------------------------------------------------------------------
Comment By: Purodha B Blissenbach (purodha)
Date: 2008-03-08 05:17
Message:
Logged In: YES
user_id=46450
Originator: YES
File Added: wikipedia.py-5107-diff.txt
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1907586&group_…
Patches item #2217096, was opened at 2008-11-02 21:58
Message generated for change (Comment added) made by nicdumz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=2217096&group_…
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: None
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 5
Private: No
Submitted By: Mauro (mauro742)
Assigned to: Nobody/Anonymous (nobody)
Summary: wikipedia.py bugfix
Initial Comment:
I attach a bugfix of edit conflict problem (#2157483)
----------------------------------------------------------------------
>Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-03-23 11:50
Message:
Many thanks for noticing this.
It's really a shame that it took us - me included - so much time to apply
your patch :/
Applied in r6536
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=2217096&group_…
Revision: 6536
Author: nicdumz
Date: 2009-03-23 10:48:54 +0000 (Mon, 23 Mar 2009)
Log Message:
-----------
Fixing edit conflict detections, per [ 2217096 ] wikipedia.py bugfix :
Screen scraping + not reading the bug reports == we had a broken framework since, at least, November
Modified Paths:
--------------
trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py 2009-03-23 10:35:53 UTC (rev 6535)
+++ trunk/pywikipedia/wikipedia.py 2009-03-23 10:48:54 UTC (rev 6536)
@@ -1541,7 +1541,8 @@
# Check blocks
self.site().checkBlocks(sysop = sysop)
# A second text area means that an edit conflict has occured.
- if 'id=\'wpTextbox2\' name="wpTextbox2"' in data:
+ editconflict = re.compile('id=["\']wpTextbox2[\'"] name="wpTextbox2"')
+ if editconflict.search(data):
raise EditConflict(u'An edit conflict has occured.')
# remove the wpAntispam keyword before checking for Spamfilter
Patches item #2456633, was opened at 2008-12-21 22:30
Message generated for change (Comment added) made by nicdumz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=2456633&group_…
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: None
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 5
Private: No
Submitted By: Alex S.H. Lin (lin4h)
Assigned to: Nobody/Anonymous (nobody)
Summary: Summary MultiProject Support and other updates
Initial Comment:
simple update:
checkimages.py:patch info for zh and ja.
Other updates:
1. wikipedia.translate Multi-project support:
first use in speedy_delete.py, if the array has key "wikipedia" and [default_family], then replace xdict to language only.
2. force put article with sysop account.
I add sysop parameter in put.it can save times when user-codes put the article, it cannot put by bot account and retry by sysop.
3. SSL connection for wikimedia projects.
by PhiLiP(a)zh.wikipedia, I combile his wikipedia_family code to family.py and add two new parameters in config.py, if SSL_connection on and default_family in available list, it can connect automatilly.
----------------------------------------------------------------------
>Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-03-23 11:36
Message:
Added the localizations in r6535, the rest had alreadz been added
previously.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=2456633&group_…
Revision: 6535
Author: nicdumz
Date: 2009-03-23 10:35:53 +0000 (Mon, 23 Mar 2009)
Log Message:
-----------
Partially applying [ 2456633 ] Summary MultiProject Support and other updates (ko & ja updates for checkimages)
Modified Paths:
--------------
trunk/pywikipedia/checkimages.py
Modified: trunk/pywikipedia/checkimages.py
===================================================================
--- trunk/pywikipedia/checkimages.py 2009-03-23 10:30:54 UTC (rev 6534)
+++ trunk/pywikipedia/checkimages.py 2009-03-23 10:35:53 UTC (rev 6535)
@@ -342,7 +342,9 @@
'commons': u'User:Filbot/White_templates#White_templates',
'en':None,
'it':u'Progetto:Coordinamento/Immagini/Bot/WhiteTemplates',
+ 'ja':None,
'ko': u'User:Kwjbot_IV/whitetemplates/list',
+ 'zh':None,
}
# A page where there's a list of template to consider as licenses.
@@ -360,8 +362,10 @@
'de' : None,
'en' : None,
'it' : u"{{subst:Progetto:Coordinamento/Immagini/Bot/Messaggi/Template_insufficiente|%s|__botnick__}} --~~~~",
+ 'ja' :None,
'ko' : u"\n{{subst:User:Kwj2772/whitetemplates|%s}} --~~~~",
'ta' : None,
+ 'zh' :None,
}
# In this part there are the parameters for the dupe images.
@@ -372,43 +376,57 @@
'commons': u'\n{{Dupe|__image__}}',
'en' : None,
'it' : u'\n{{Progetto:Coordinamento/Immagini/Bot/Template duplicati|__images__}}',
+ 'ja' :None,
+ 'zh' :None,
}
# Head of the message given to the author
duplicate_user_talk_head = {
'commons': None,
'en' : None,
'it' : u'\n\n== File doppio ==\n',
+ 'ja' :None,
+ 'zh' :None,
}
# Message to put in the talk
duplicates_user_talk_text = {
'commons': u'{{subst:User:Filnik/duplicates|File:%s|File:%s}}', # FIXME: it doesn't exist
'en' : None,
'it' : u"{{subst:Progetto:Coordinamento/Immagini/Bot/Messaggi/Duplicati|%s|%s|__botnick__}} --~~~~",
+ 'ja' :None,
+ 'zh' :None,
}
# Comment used by the bot while it reports the problem in the uploader's talk
duplicates_comment_talk = {
'commons': u'Bot: Dupe file found',
'en' : None,
'it' : u"Bot: Notifico il file doppio trovato",
+ 'ja' :None,
+ 'zh' :None,
}
# Comment used by the bot while it reports the problem in the image
duplicates_comment_image = {
'commons': u'Bot: Tagging dupe file',
'en' : None,
'it' : u'Bot: File doppio, da cancellare',
+ 'ja' :None,
+ 'zh' :None,
}
# Regex to detect the template put in the image's decription to find the dupe
duplicatesRegex = {
'commons': r'\{\{(?:[Tt]emplate:|)[Dd]upe[|}]',
'en' : None,
'it' : r'\{\{(?:[Tt]emplate:|)[Pp]rogetto:[Cc]oordinamento/Immagini/Bot/Template duplicati[|}]',
+ 'ja' :None,
+ 'zh' :None,
}
# Category with the licenses and / or with subcategories with the other licenses.
category_with_licenses = {
'commons': 'Category:License tags',
- 'en' : None,
+ 'en' : 'Category:Wikipedia image copyright templates',
'it' : 'Categoria:Template Licenze copyright',
+ 'ja' : 'Category:画像の著作権表示テンプレート',
'ko' : '분류:그림 저작권 틀',
+ 'zh' : 'Category:版權申告模板',
}
## Put None if you don't use this option or simply add nothing if en
@@ -417,11 +435,15 @@
emailPageWithText = {
'de':'Benutzer:ABF/D3',
'en':None,
+ 'ja':None,
+ 'zh':None,
}
# Title of the email
emailSubject = {
'de':'Problemen mit Deinem Bild auf der Deutschen Wikipedia',
'en':None,
+ 'ja':None,
+ 'zh':None,
}
# Add your project (in alphabetical order) if you want that the bot start
Patches item #2126564, was opened at 2008-09-24 16:49
Message generated for change (Comment added) made by nicdumz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=2126564&group_…
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: Translations
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 5
Private: No
Submitted By: Thomas Andrew (broadbeer)
Assigned to: Nobody/Anonymous (nobody)
Summary: Changed danish description
Initial Comment:
For information purpose I have changed the danish description for clean_sandbox.py
----------------------------------------------------------------------
>Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-03-23 11:31
Message:
applied in r6534
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=2126564&group_…
Patches item #2304169, was opened at 2008-11-17 09:33
Message generated for change (Comment added) made by nicdumz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=2304169&group_…
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: Translations
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 5
Private: No
Submitted By: Woo-Jin Kim (kwj2772)
Assigned to: Nobody/Anonymous (nobody)
Summary: nowcommons.py & image.py
Initial Comment:
nowcommons.py and image.py were updated for Korean
Diff:
nowcommons.py
http://ko.wikipedia.org/w/index.php?diff=2532702&oldid=2532573&diffonly=yes
image.py
http://ko.wikipedia.org/w/index.php?diff=2534355&oldid=2534337
Thank you.
----------------------------------------------------------------------
>Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-03-23 11:26
Message:
thanks!!
applied in r6533
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=2304169&group_…