Bugs item #1837304, was opened at 2007-11-23 23:26
Message generated for change (Comment added) made by rotemliss
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1837304&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: 5
Private: No
Submitted By: André Malafaya Baptista (malafaya)
Assigned to: Nobody/Anonymous (nobody)
Summary: No featured articles for pages with slash
Initial Comment:
Every time a featured article contains a slash (/), that page is not processed.
For example, while processing featured article in en.wiki:
(...)
>>> A. E. J. Collins <<<
No corresponding page in wikipedia:io
AC/DC is a subpage
>>> AHS Centaur <<<
No corresponding page in wikipedia:io
(...)
AC/DC is not processed because it contains a slash and thus it's considered a subpage.
----------------------------------------------------------------------
Comment By: Rotem Liss (rotemliss)
Date: 2007-11-25 14:25
Message:
Logged In: YES
user_id=1327030
Originator: NO
Fixed in r4589.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1837304&group_…
Revision: 4589
Author: rotem
Date: 2007-11-25 12:24:46 +0000 (Sun, 25 Nov 2007)
Log Message:
-----------
(bug 1837304) Don't skip a page with slash if it is in the main namespace, which usually doesn't contain subpages (anyway, if it is a featured subpage, why not adding Link FA despite it?).
Modified Paths:
--------------
trunk/pywikipedia/featured.py
Modified: trunk/pywikipedia/featured.py
===================================================================
--- trunk/pywikipedia/featured.py 2007-11-25 12:02:05 UTC (rev 4588)
+++ trunk/pywikipedia/featured.py 2007-11-25 12:24:46 UTC (rev 4589)
@@ -253,7 +253,7 @@
for a in arts:
if a.title()<afterpage:
continue
- if u"/" in a.title():
+ if u"/" in a.title() and a.namespace() != 0:
wikipedia.output(u"%s is a subpage" % a.title())
continue
if a.title() in cc:
Bugs item #1834705, was opened at 2007-11-19 20:35
Message generated for change (Comment added) made by rotemliss
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1834705&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: other
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: André Malafaya Baptista (malafaya)
Assigned to: Nobody/Anonymous (nobody)
Summary: redirect.py doesn't use localized version of #REDIRECT
Initial Comment:
replace.py always uses the magic word #REDIRECT when resolving double-redirects.
I tried it on a page which had a localized version of the #REDIRECT magic word and the changes suggested by it include replacing the already localized version back to #REDIRECT .
The affected language (ka) has #REDIRECT localized in family.py.
I believe the problem in at line 288 of redirect.py where you can find #REDIRECT hard-coded. Thanks.
----------------------------------------------------------------------
Comment By: Rotem Liss (rotemliss)
Date: 2007-11-25 14:04
Message:
Logged In: YES
user_id=1327030
Originator: NO
Fixed in r4588.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1834705&group_…
Bugs item #1837716, was opened at 2007-11-24 19:44
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1837716&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: other
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: David Crochet (crochet_david)
Assigned to: Nobody/Anonymous (nobody)
Summary: crash with cosmetic_change.py
Initial Comment:
The python verbose :
dcrochet@linux-fxgk:~/pywikipedia> python cosmetic_changes.py -new
Checked for running processes. 1 processes currently running, including the current process.
ATTENTION: You can run this script as a stand-alone for testing purposes.
However, the changes are that are made are only minor, and other users
might get angry if you fill the version histories and watchlists with such
irrelevant changes.
Do you really want to continue? ([y]es, [N]o) y
Getting 60 pages from wikiversity:fr...
>>> Vocabulaire/Portugais/Prérequis conseillés <<<
Traceback (most recent call last):
File "cosmetic_changes.py", line 400, in ?
main()
File "cosmetic_changes.py", line 396, in main
bot.run()
File "cosmetic_changes.py", line 361, in run
self.treat(page)
File "cosmetic_changes.py", line 342, in treat
changedText = ccToolkit.change(page.get())
File "cosmetic_changes.py", line 94, in change
text = self.translateAndCapitalizeNamespaces(text)
File "cosmetic_changes.py", line 154, in translateAndCapitalizeNamespaces
wrongNamespaces.append(defaultNs[0].lower() + defaultNs[1:])
IndexError: string index out of range
dcrochet@linux-fxgk:~/pywikipedia>
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1837716&group_…
Revision: 4586
Author: filnik
Date: 2007-11-24 14:38:50 +0000 (Sat, 24 Nov 2007)
Log Message:
-----------
This patch will make the build of some strings less buggy and should be more elegant too
Modified Paths:
--------------
trunk/pywikipedia/welcome.py
Modified: trunk/pywikipedia/welcome.py
===================================================================
--- trunk/pywikipedia/welcome.py 2007-11-21 22:48:58 UTC (rev 4585)
+++ trunk/pywikipedia/welcome.py 2007-11-24 14:38:50 UTC (rev 4586)
@@ -363,7 +363,7 @@
# and i put them in a list (i find it more easy and secure).
while 1:
# FIXME: That's the regex, if there are problems, take a look here.
- reg = r'\(<a href=\"/w/index.php\?title=' + talk + r'(.*?)&(amp;|)action=edit\"'
+ reg = r'\(<a href=\"/w/index.php\?title=%s(.*?)&(amp;|)action=edit\"' % talk
p = re.compile(reg, re.UNICODE)
x = p.search(raw, pos)
if x == None:
@@ -378,10 +378,10 @@
if username not in done:
done.append(username)
userpage = wikipedia.Page(wsite, username)
- usertalkpage = wikipedia.Page(wsite, talk + username)
+ usertalkpage = wikipedia.Page(wsite, str(talk) + str(username))
# Defing the contrib's page of the user.
pathWiki = wsite.family.nicepath(wsite.lang)
- con = pathWiki + 'Special:Contributions/'+ userpage.urlname()
+ con = '%sSpecial:Contributions/%s' % (pathWiki, userpage.urlname())
# Getting the contribs...
contribs = wsite.getUrl(con)
contribnum = contribs.count('<li>') # Maxes at 50, but not important.
@@ -485,9 +485,9 @@
else:
safety.append(u'{|border="2" cellpadding="4" cellspacing="0" style="margin: 0.5em 0.5em 0.5em 1em; padding: 0.5em; background: #bfcda5; border: 1px #b6fd2c solid; border-collapse: collapse; font-size: 95%;"')
# The string below show how the "Usernames" will be notified.
- safety.append('\n!' + usernam)
+ safety.append('\n!%s' % usernam)
# The string below show how the "Contribs" will be notified.
- safety.append(u'\n!' + contrib)
+ safety.append(u'\n!%s' % contrib)
for found_result in welcomed_users:
# Adding the log... (don't take care of the variable's name...).
@@ -613,7 +613,7 @@
contrib = string.capitalize(wsite.mediawiki_message('contribslink'))
# The talk_page's variable gives "Talk page".
talk_page = wsite.namespace(3)
- talk = urlname(talk_page, wsite) + ':'
+ talk = '%s:' % urlname(talk_page, wsite)
# Some project of the same language, have different settings. (this is the place to add them).
if wsite.family.name == "wikinews" and wsite.lang == "it":
@@ -709,7 +709,7 @@
# The URL for new users is the same in every project. It should not be changed.
URL = "/w/index.php?title=Special:Log&type=newusers&limit=%d&offset=%d" % (limit, offset_variable)
log = wsite.getUrl(URL)
- wikipedia.output(u'Loading latest ' + str(limit) + u' new users from ' + (wsite.hostname()) + u'...\n')
+ wikipedia.output(u'Loading latest %s new users from %s...\n' % (limit, wsite.hostname()))
# Determine which signature to use
if random == True:
try:
@@ -727,9 +727,9 @@
number_user = 0
yield number_user
if wsite.family.name == "wikipedia" and wsite.lang == "zh":
- welcom = welcomer % signList[number_user] + timeselected + '<small>(via ~~~)</small>'
+ welcom = welcomer % signList[number_user] + timeselected + '<small>(via ~~~)</small>'
else:
- welcom = welcomer % signList[number_user] + timeselected
+ welcom = welcomer % signList[number_user] + timeselected
else:
welcom = welcomer % sign
username = str(found_result[0])
@@ -753,7 +753,7 @@
if word.lower() in username.lower():
baduser = True
if wsite.lang == 'it':
- final_rep = rep_text + word + '}}'
+ final_rep = "%s%s}}" % (rep_text, word)
break
else:
final_rep = rep_text
Hello all,
A while ago, a discussion was started about the rewrite project, bug
was left unfinished. In order to help it reach a consensus, I'm
summarizing the discussion up to here, with the hope that you'll read
this rather long email and comment about the uncertainities left.
Merlijn proposed thees four to be taken into account prior to starting
the rewrite project:
a) to restructure the framework
b) to have consistent formatting (including coding style) and documentation
c) to move to the API
d) to add i18n support
He suggested PEP 8 for coding style, while X other people commented in
favor of camelCase. He also suggested using u'' for all strings,
Epydoc for inline documentation and __version__ in every file; no one
argued against any of these.
Not much discussion took place about items c and d. (Having read all
that, I'm still not sure if we reached an agreement about moving to
API totally -- and solely -- or not, though).
Item a, on the other hand, seems to be approached differently by
different persons. Merlijn suggested use of unit testing, which was
supported by some others. He also suggested a one-module-per-class
style, keeping it thread safe. Some people depicted disadvantages of
(and ambiguities of) one-module-per-class style, and I see no final
decission.
Bryan took a different approach and proposed separation of the code to
different levels as such:
* High-level
* Middleware
* Lowware or core
He also proposed some connections between each part of the current
code, and the desired "level" in the above classification.
Bryan later shared some thoughts about the GZip module. He also
suggested having a code name for our rewrite project (rather than, for
example, "pywikipedia 2.0" which was perhaps coined by Misza).
That's all. It's your comments which can drive it more ahead.
I'm not a professional programmer, nor can I call myself an expert in
Python. So please excuse me if I misunderstood something and reflected
it incorrectly in the above.
Cheers,
Hojjat (aka Huji)
Bugs item #1831698, was opened at 2007-11-14 11:44
Message generated for change (Comment added) made by btongminh
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1831698&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: General
Group: None
Status: Open
Resolution: Fixed
Priority: 8
Private: No
Submitted By: siebrand (siebrand)
Assigned to: Nobody/Anonymous (nobody)
Summary: Partial pages saved on connection reset
Initial Comment:
I have gotten 2 reports of CommonsDelinker saving incomplete pages: http://bg.wikipedia.org/w/index.php?title=19_%D0%BD%D0%BE%D0%B5%D0%BC%D0%B2… and http://ru.wikipedia.org/w/index.php?title=%D0%93%D0%BB%D0%B0%D0%B7%D0%B3%D0…
Discussing this on IRC it was thought to originate from a connection reset. My question was why the wiki would save a page that was not sent completely. This appears to have to do with sending an 'edit token' before the edit data. If possible, this should be reversed so these mistakes cannot happen (worst case is the edit is not made).
IRC chat (freenode #pywikipediabot):
[11:57] <siebrand> Bryan: big "oops": <URL at ru.wp>
[11:58] <valhallasw> siebrand: looks like some connection reset
[..]
[11:58] <Bryan> what valhallasw said
[..]
[11:58] <Bryan> maybe we should change wikipedia.py such that it sends wpEditToken as last item
[11:59] <Bryan> so stuff like this doesn't happen
[11:59] <siebrand> Connection reset sounds logical, although, why would MediaWiki accept that?
[11:59] <valhallasw> because connection closed is connection closed
[11:59] <siebrand> ah, I see bryan explained that :)
[12:00] <valhallasw> Bryan: sounds like a good idea in any case :)
[12:00] <siebrand> indeed the bot needs to signal in some way that it is actually "done submitting" before the wiki accepts its changes. If that is the "edit token", then it may be a good idea to send that as the last item.
[12:00] <valhallasw> well, mediawiki won't accept an edit without edit token
[12:00] <valhallasw> and it has no way to check if the complete request has been sent
[12:00] <valhallasw> so the only way to prevent saving is sending some required header last
[12:01] <valhallasw> Bryan: are we not using some content-length header? that should fix the problem, too
[12:01] <Bryan> no idea
----------------------------------------------------------------------
>Comment By: Bryan (btongminh)
Date: 2007-11-23 23:36
Message:
Logged In: YES
user_id=1806226
Originator: NO
I looked some more into this and the problem seems that you can't rely on
the server to send the Content-Length header. Something else that might be
worthwhile is to have the gzip module raise an error if the content is
incomplete.
----------------------------------------------------------------------
Comment By: Bryan (btongminh)
Date: 2007-11-19 21:42
Message:
Logged In: YES
user_id=1806226
Originator: NO
Reopened: Fix only works when using persistent_http = True. A similar
solution must come up for persistent_http = False.
----------------------------------------------------------------------
Comment By: Bryan (btongminh)
Date: 2007-11-15 20:18
Message:
Logged In: YES
user_id=1806226
Originator: NO
Fixed in r4560.
----------------------------------------------------------------------
Comment By: Bryan (btongminh)
Date: 2007-11-15 19:12
Message:
Logged In: YES
user_id=1806226
Originator: NO
Since it is also happening to SieBot, I assume that it is an error in the
framework.
I think that it originates from the function that gets the data from the
server. As valhallasw points out, the server would just reject incomplete
postdata, as we do set content-length.
The last character from
http://ru.wikipedia.org/w/index.php?title=%D0%93%D0%BB%D0%B0%D0%B7%D0%B3%D0…
is '\xef\xbf\xbd' or u'\ufffd', more commonly known 'Unicode replace
character'. This character is inserted when an invalid unicode sequence is
read. I think we should very thoroughly look at the get routines and add
more checks, such as a check for content-length, in order to prevent stuff
like this from happening.
----------------------------------------------------------------------
Comment By: siebrand (siebrand)
Date: 2007-11-15 13:49
Message:
Logged In: YES
user_id=1107255
Originator: YES
Two more:
http://es.wikipedia.org/w/index.php?title=Argentina&curid=10&diff=12811540&…http://es.wikipedia.org/w/index.php?title=Argentina&curid=10&diff=12811713&…
----------------------------------------------------------------------
Comment By: siebrand (siebrand)
Date: 2007-11-15 10:50
Message:
Logged In: YES
user_id=1107255
Originator: YES
A very recent one:
http://it.wikipedia.org/w/index.php?title=Discussione:Socialdemocrazia&diff…
----------------------------------------------------------------------
Comment By: siebrand (siebrand)
Date: 2007-11-15 08:51
Message:
Logged In: YES
user_id=1107255
Originator: YES
Additional report:
http://fr.wikipedia.org/w/index.php?title=Guerre_de_Cent_Ans&diff=22942716&…
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1831698&group_…