https://bugzilla.wikimedia.org/show_bug.cgi?id=54549
Web browser: ---
Bug ID: 54549
Summary: Not load unnecessary data in token()
Product: Pywikibot
Version: unspecified
Hardware: All
OS: All
Status: ASSIGNED
Severity: normal
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: legoktm.wikipedia(a)gmail.com
Classification: Unclassified
Mobile Platform: ---
Originally from: http://sourceforge.net/p/pywikipediabot/patches/606/
Reported by: Anonymous user
Created on: 2013-04-08 12:22:18
Subject: Not load unnecessary data in token()
Assigned to: legoktm
Original description:
In token\(\), It queries info and \*all\* revisions of a page. Querying all
revisions is too expensive and unnecessary. For example, if I just want to
process the last revision of several pages and put them back, with the old
code, it loads all revisions when putting. It makes putting in rewrite branch
spend time about 10x compared to that in the trunk.
The patch I am presenting just do not load revisions. It shouldn't break other
functions since needed data has included in the info of a page.
\----
Pywikibot branches/rewrite/ \(r11357, 2013/04/07, 14:50:30, ok\)
Python 2.7.3 \(default, Sep 26 2012, 21:53:58\)
\[GCC 4.7.2\]
unicode test: ok
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=60381
Web browser: ---
Bug ID: 60381
Summary: Return of the AttributeError: 'Page' object has no
attribute '_isredir'
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: major
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: geofbot(a)gmail.com
Classification: Unclassified
Mobile Platform: ---
We thought this was fixed, but alas...
local-sn1pebot@tools-login:~/core/pywikibot$ python
Python 2.7.3 (default, Sep 26 2013, 20:03:06)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pywikibot
>>> site = pywikibot.getSite()
>>> page = pywikibot.Page(site)
>>> page.get("Cat")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/data/project/sn1pebot/.local/lib/python2.7/site-packages/pywikibot/__init__.py",
line 356, in wrapper
return method(*__args, **__kw)
File
"/data/project/sn1pebot/.local/lib/python2.7/site-packages/pywikibot/__init__.py",
line 356, in wrapper
return method(*__args, **__kw)
File
"/data/project/sn1pebot/.local/lib/python2.7/site-packages/pywikibot/page.py",
line 300, in get
self._getInternals(sysop)
File
"/data/project/sn1pebot/.local/lib/python2.7/site-packages/pywikibot/page.py",
line 330, in _getInternals
if self._isredir:
AttributeError: 'Page' object has no attribute '_isredir'
>>>
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=71828
Bug ID: 71828
Summary: replace.py should report number of changed pages
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: Other scripts
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: jan.dudik(a)gmail.com
Web browser: ---
Mobile Platform: ---
compat version had at the end of run message
N pages were changed
in core is missing this info
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=72609
Bug ID: 72609
Summary: multiprocessor nosetests doesnt work
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: minor
Priority: Unprioritized
Component: tests
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: jayvdb(a)gmail.com
Web browser: ---
Mobile Platform: ---
I've tried various settings of _multiprocess_can_split_ and
_multiprocess_shared_ ; all result in the following.
$ nosetests-3.3 --processes=2 --process-timeout=20 --process-restartworker -v
tests.wikibase_tests.TestJSON
test_itempage_json (tests.wikibase_tests.TestJSON) ... ERROR
test_json_diff (tests.wikibase_tests.TestJSON) ... ERROR
======================================================================
ERROR: test_itempage_json (tests.wikibase_tests.TestJSON)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python3.3/site-packages/nose/plugins/multiprocess.py", line
812, in run
test(orig)
File "/usr/lib/python3.3/site-packages/nose/case.py", line 46, in __call__
return self.run(*arg, **kwarg)
File "/usr/lib/python3.3/site-packages/nose/case.py", line 134, in run
self.runTest(result)
File "/usr/lib/python3.3/site-packages/nose/case.py", line 152, in runTest
test(result)
File "/usr/lib64/python3.3/unittest/case.py", line 529, in __call__
return self.run(*args, **kwds)
File "/usr/lib64/python3.3/unittest/case.py", line 475, in run
self._executeTestPart(self.setUp, outcome)
File "/usr/lib64/python3.3/unittest/case.py", line 422, in _executeTestPart
function()
File ".../tests/wikibase_tests.py", line 895, in setUp
self.wdp = pywikibot.ItemPage(wikidata, 'Q60')
File ".../pywikibot/page.py", line 3087, in __init__
ns=site.item_namespace)
File ".../pywikibot/site.py", line 4887, in item_namespace
self._cache_entity_namespaces()
File ".../pywikibot/site.py", line 4868, in _cache_entity_namespaces
for namespace in self.namespaces().values():
File ".../pywikibot/site.py", line 2149, in namespaces
self._build_namespaces()
File ".../pywikibot/site.py", line 2010, in _build_namespaces
is_mw114 = LV(self.version()) >= LV('1.14')
File ".../pywikibot/site.py", line 2094, in version
version = self.siteinfo.get('generator', expiry=1).split(' ')[1]
File ".../pywikibot/site.py", line 1192, in get
preloaded = self._get_general(key, expiry)
File ".../pywikibot/site.py", line 1138, in _get_general
default_info = self._get_siteinfo(props, expiry)
File ".../pywikibot/site.py", line 1066, in _get_siteinfo
data = request.submit()
File ".../pywikibot/data/api.py", line 828, in submit
self._data = super(CachedRequest, self).submit()
File ".../pywikibot/data/api.py", line 584, in submit
headers=headers, body=body)
File ".../pywikibot/tools.py", line 529, in wrapper
return obj(*__args, **__kw)
File ".../pywikibot/comms/http.py", line 249, in request
time.sleep(0.1)
File "/usr/lib/python3.3/site-packages/nose/plugins/multiprocess.py", line
276, in signalhandler
raise TimedOutException()
nose.plugins.multiprocess.TimedOutException: 'test_itempage_json
(tests.wikibase_tests.TestJSON)'
======================================================================
ERROR: test_json_diff (tests.wikibase_tests.TestJSON)
----------------------------------------------------------------------
Traceback (most recent call last):
File ".../tests/wikibase_tests.py", line 895, in setUp
self.wdp = pywikibot.ItemPage(wikidata, 'Q60')
File ".../pywikibot/page.py", line 3087, in __init__
ns=site.item_namespace)
File ".../pywikibot/site.py", line 4894, in item_namespace
% self)
pywikibot.exceptions.EntityTypeUnknownException: DataSite("wikidata",
"wikidata") does not support entity type "item"
----------------------------------------------------------------------
Ran 2 tests in 20.152s
FAILED (errors=2)
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=72527
Bug ID: 72527
Summary: CircularRedirect exception throws another exception
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: russblau(a)hotmail.com
Web browser: ---
Mobile Platform: ---
For testing, a creating a sandbox page that redirects to itself:
>>> s = pywikibot.Site()
>>> p = pywikibot.Page(s, "User:R'n'B/sandbox")
>>> p.getRedirectTarget()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/shared/pywikipedia/rewrite/pywikibot/page.py", line 1361, in
getRedirec tTarget
return self.site.getredirtarget(self)
File "/shared/pywikipedia/rewrite/pywikibot/site.py", line 2347, in
getredirta rget
raise pywikibot.CircularRedirect(target_title)
File "/shared/pywikipedia/rewrite/pywikibot/exceptions.py", line 99, in
__init __
self.title = page.title(asLink=True)
TypeError: title() takes no keyword arguments
I don't understand the cause here, since page.title(asLink=True) works fine in
other contexts.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=71401
Bug ID: 71401
Summary: have an option to pass upload warning for
imagetransfer.py
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: Other scripts
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: reza.energy(a)gmail.com
Web browser: ---
Mobile Platform: ---
I want to use imagetransfer.py inside other bot and using it automaticlay
when an image is deleted before on local wiki (target wiki) it asks:
Do you want to ignore? ([y]es, [N]o)
It is much better to have an option for ignoring API warning (the image was
deleted warning).
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=72504
Bug ID: 72504
Summary: redirect.py not usable on 1.19.3
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: redirect.py
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: Phoenixoverride(a)gmail.com
Web browser: ---
Mobile Platform: ---
Traceback (most recent call last):
File "C:\rewrite\pwb.py", line 178, in <module>
run_python_file(fn, argv, argvu)
File "C:\rewrite\pwb.py", line 75, in run_python_file
exec(compile(source, filename, "exec"), main_mod.__dict__)
File "C:\rewrite\scripts\redirect.py", line 814, in <module>
main()
File "C:\rewrite\scripts\redirect.py", line 811, in main
bot.run()
File "C:\rewrite\scripts\redirect.py", line 714, in run
self.fix_double_redirects()
File "C:\rewrite\scripts\redirect.py", line 526, in fix_double_redirects
self.fix_1_double_redirect(redir_name)
File "C:\rewrite\scripts\redirect.py", line 597, in fix_1_double_redirect
'wikieditor-toolbar-tool-redirect-example')
File "C:\rewrite\pywikibot\site.py", line 1807, in mediawiki_message
return self.mediawiki_messages([key])[key]
File "C:\rewrite\pywikibot\site.py", line 1795, in mediawiki_messages
% locals())
KeyError: "Site local:en has no message 'wikieditor-toolbar-tool-redirect-exam
ple'"
<type 'exceptions.KeyError'>
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=72294
Bug ID: 72294
Summary: deperecated methods in replace.py
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: minor
Priority: Unprioritized
Component: Other scripts
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: jan.dudik(a)gmail.com
Web browser: ---
Mobile Platform: ---
I made some replaces with manual confimration.
...
Retrieving 50 pages from wikipedia:cs.
No changes were necessary in [[Kategorie:Wireless Application Protocol]]
>>> Kategorie:WTA Finals 2014 <<<
- {{Hlavni clanek}}
+ {{Hlavni clanek|{{subst:PAGENAME}}}}
WARNING: pywikibot.bot.inputChoice is deprecated, use input_choice instead.
Do you want to accept these changes? ([y]es, [N]o, [e]dit, open in [b]rowser,
[a]ll, [q]uit) y
Retrieving 50 pages from wikipedia:cs.
...
WARNING: pywikibot.replaceExcept is DEPRECATED, use
pywikibot.textlib.replaceExcept instead.
(this message was in cca 25 lines, then was clear output again)
No changes were necessary in [[Kategorie:Zeleznicni stanice v Madarsku]]
No changes were necessary in [[Kategorie:Zeleznicni stanice v Cesku]]
No changes were necessary in [[Kategorie:Zaznamova zarizeni]]
>>> Kategorie:Zuslechtovani textilii <<<
- {{Hlavni clanek}}
+ {{Hlavni clanek|{{subst:PAGENAME}}}}
WARNING: pywikibot.bot.inputChoice is deprecated, use input_choice instead.
Do you want to accept these changes? ([y]es, [N]o, [e]dit, open in [b]rowser,
[a]ll, [q]uit) Page [[Kategorie:WTA Finals 2014]] saved
y
(see missing end of line between "[q]uit" and "Page")
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=64794
Bug ID: 64794
Summary: Delinker should delink and replace images on Wikidata
too
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: Wikidata
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: maarten(a)mdammers.nl
Depends on: 46358
Web browser: ---
Mobile Platform: ---
At the moment if an image gets deleted/replaced/renamed on Commons, the
delinker works on about any Wikimedia project except Wikidata.
See
https://www.wikidata.org/wiki/Wikidata:Database_reports/Constraint_violatio…
for the current backlog.
Delinker needs globalusage on Wikidata so it can find where the images are
used.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=66275
Bug ID: 66275
Summary: implement Echo support (notifications)
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: ricordisamoa(a)openmailbox.org
Web browser: ---
Mobile Platform: ---
We should support the use of the "meta=notifications" API.
--
You are receiving this mail because:
You are the assignee for the bug.