https://bugzilla.wikimedia.org/show_bug.cgi?id=71398
Bug ID: 71398
Summary: Username case changes after site.data_repository
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: trivial
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: CommodoreFabianus(a)gmx.de
Web browser: ---
Mobile Platform: ---
When the username starts in lowercase it's stored with that lowercase in the
“_sites” map. A site requested via data_repository() is stored with an
uppercase starting username.
>>> import pywikibot
>>> s = pywikibot.Site('test', 'wikidata')
>>> pywikibot._sites
{'wikidata:test:xZise': Site("test", "wikidata")}
>>> type(s)
<class 'pywikibot.site.APISite'>
>>> d = s.data_repository()
>>> type(d)
<class 'pywikibot.site.DataSite'>
>>> pywikibot._sites
{'wikidata:test:xZise': Site("test", "wikidata"), 'wikidata:test:XZise':
DataSite("test", "wikidata")}
This doesn't make a difference usually, because it requests via the “original”
lowercased name:
>>> import pywikibot
>>> pywikibot.Site('en', 'wikipedia')
Site("en", "wikipedia")
>>> pywikibot._sites
{'wikipedia:en:xZise': Site("en", "wikipedia")}
>>> pywikibot.Site('en', 'wikipedia')
Site("en", "wikipedia")
>>> pywikibot._sites
{'wikipedia:en:xZise': Site("en", "wikipedia")}
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=72974
Bug ID: 72974
Summary: Password file should normalize username
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: login.py
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: valhallasw(a)arctus.nl
Web browser: ---
Mobile Platform: ---
With
user-config.py
--------------
family = 'wikipedia'
mylang = 'en'
usernames['wikipedia']['en'] = u'valhallasw'
password_file = 'password'
password
--------
(u'valhallasw', 'topsecretpassword')
The password is not used, as the username is u'Valhallasw' once LoginManager
checks the password file.
LoginManager should normalize the usernames in the password file.
Workaround:
Use (u'Valhallasw', 'topsecretpassword') in the password file.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=72667
Bug ID: 72667
Summary: KeyError: allpages for interwiki
Product: Pywikibot
Version: compat (1.0)
Hardware: All
OS: All
Status: NEW
Severity: critical
Priority: Unprioritized
Component: interwiki.py
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: jan.dudik(a)gmail.com
Web browser: ---
Mobile Platform: ---
interwiki.py -async -family:wiktionary -cleanup -continue -array:50 -query:30
-untranslated
...
NOTE: The first unfinished subject is [[cs:Kategorie:Finština]]
NOTE: Number of pages queued is 30, trying to add 30 more.
Dump cs (wiktionary) written.
Traceback (most recent call last):
File "D:\Py\interwiki.py", line 2665, in <module>
main()
File "D:\Py\interwiki.py", line 2639, in main
bot.run()
File "D:\Py\interwiki.py", line 2358, in run
self.queryStep()
File "D:\Py\interwiki.py", line 2331, in queryStep
self.oneQuery()
File "D:\Py\interwiki.py", line 2299, in oneQuery
site = self.selectQuerySite()
File "D:\Py\interwiki.py", line 2270, in selectQuerySite
self.generateMore(globalvar.maxquerysize - mycount)
File "D:\Py\interwiki.py", line 2178, in generateMore
page = self.pageGenerator.next()
File "D:\Py\pagegenerators.py", line 1104, in CombinedPageGenerator
for page in generator:
File "D:\Py\pagegenerators.py", line 549, in AllpagesPageGenerator
includeredirects=includeredirects):
File "D:\Py\wikipedia.py", line 8559, in allpages
warning = data['warnings']['allpages']['*']
KeyError: 'allpages'
D:\Py>
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=70795
Bug ID: 70795
Summary: Pywikibot does not work on closed WMF wikis
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: jayvdb(a)gmail.com
Web browser: ---
Mobile Platform: ---
It should be possible to access closed WMF wikis. The pywikibot family files
prevent this, and result in errors when attempting to instantiate a Site for a
closed wiki.
At least read API calls should be possible, and write actions depending on
user-rights. e.g. stewards have edit rights.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=72941
Bug ID: 72941
Summary: Don't remove non-breaking spaces before percent in
Spanish
Product: Pywikibot
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Unprioritized
Component: Cosmetic changes
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: benjavalero(a)gmail.com
Web browser: ---
Mobile Platform: ---
The Spanish style guidelines
(https://es.wikipedia.org/wiki/Wikipedia:Manual_de_estilo#Espacios_duros) now
recommends to include a non-breaking space before the percent symbol, but this
script removes it.
This part of the script (method removeNonBreakingSpaceBeforePercent) should not
be executed if the config lang is Spanish (es).
Besides, the help comment in "core" branch is wrong, because it says "Insert a
non-breaking space between number and percent sign.", when the method does the
opposite.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=69134
Bug ID: 69134
Summary: delete attempts to recreate deleted page, and fails
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: jayvdb(a)gmail.com
Web browser: ---
Mobile Platform: ---
If the page is deleted and the bot doesnt have a sysop account, delete.py
attempts to recreate it by marking it for deletion.
Without sysop account:
$ python pwb.py delete -page:'Test page'
Enter a reason for the deletion: It already is deleted
Processing page Test page
Can't delete [[en:Test page]]; do you want to mark it for deletion instead?
([Y]es, [N]o, [A]ll) Y
Sleeping for 7.0 seconds, 2014-08-05 09:03:50
Traceback (most recent call last):
File "pwb.py", line 166, in <module>
run_python_file(fn, argv, argvu)
File "pwb.py", line 67, in run_python_file
exec(compile(source, filename, "exec"), main_mod.__dict__)
File "scripts/delete.py", line 140, in <module>
main()
File "scripts/delete.py", line 133, in main
bot.run()
File "scripts/delete.py", line 75, in run
page.delete(self.summary, not self.getOption('always'))
File ".../pywikibot/__init__.py", line 476, in wrapper
return method(*__args, **__kw)
File ".../pywikibot/page.py", line 1475, in delete
return self.save(comment=reason)
File ".../pywikibot/__init__.py", line 476, in wrapper
return method(*__args, **__kw)
File ".../pywikibot/page.py", line 942, in save
**kwargs)
File ".../pywikibot/page.py", line 953, in _save
watch=watchval, bot=botflag, **kwargs)
File ".../pywikibot/site.py", line 575, in callee
return fn(self, *args, **kwargs)
File ".../pywikibot/site.py", line 2942, in editpage
raise LockedPage(errdata['title'])
pywikibot.exceptions.LockedPage: Page Test page is locked.
<class 'pywikibot.exceptions.LockedPage'>
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=72914
Bug ID: 72914
Summary: wrong logic in generate_user_files.py
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: rubin.happy(a)gmail.com
Web browser: ---
Mobile Platform: ---
when I am running "generate_user_files.py" I get message:
Your default user directory is "/data/project/rubinbot2/.rubinbot2"
Do you want to use that directory? ([y]es, [N]o) y
New user directory?
So, if I answer "yes" to "do you want to use that directory", it asks me to
create a new one, and if I answer "no" - the proposed folder is used.
I think that "yes" and "no" answers are mixed here.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=72918
Bug ID: 72918
Summary: pwb.py user-config.py search path incorrect
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: valhallasw(a)arctus.nl
Web browser: ---
Mobile Platform: ---
The search path was:
PYWIKIBOT2_DIR, (pwb directory)
and is now
PYWIKIBOT2_DIR, ., ~/.pywikibot,
(changed in
https://github.com/wikimedia/pywikibot-core/commit/3a1ba465c74af95e52e5312f…)
which is the same if we are in the pwb directory, but not if this is not the
case! This is e.g. often the case with jsub commands such as
jsub python /data/project/some/path/pwb.py scriptname
which is expected to use the user-config in /data/project/some/path, not the
user-config in /data/project/.pywikibot/
The search order should probably be adapted to PYWIKIBOT2_DIR, ., pwb dir,
~/.pywikibot.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=55104
Web browser: ---
Bug ID: 55104
Summary: Recreate deleted page
Product: Pywikibot
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: enhancement
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/feature-requests/144/
Reported by: Anonymous user
Created on: 2008-04-19 14:50:59
Subject: Recreate deleted page
Original description:
I searched and found closed and open bugs on recreating deleted pages, but I
think I can put it differently than others:
I \*want\* to use pagefromfile to upload a large amount of text that a user
upload badly by hand. Those pages have been deleted and would be much better
created en masse by the bot. I understand why most people would not want their
bots creating previously deleted pages, but it should be an option. Even if I
had to hit "Y" every time like I do with deletes, it should be possible.
I tried removing the pertaining objections in wikipedia.py, but the layout on
editing a previously deleted page is too different.
This should be an easy error to recreate.
mrandmrsmurphy(a)gmail.com
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=72885
Bug ID: 72885
Summary: Dry tests aren't dry without explicit "dry = True"
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: tests
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: CommodoreFabianus(a)gmx.de
Web browser: ---
Mobile Platform: ---
Unless a test is explicitly defined with "dry = True" it won't be in “dry”
mode. For example https://gerrit.wikimedia.org/r/170577 couldn't work when dry,
as it then needs to be set source explicitly:
ERROR: test_valid (tests.link_tests.TestLink)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/xzise/Programms/core/tests/link_tests.py", line 33, in test_valid
self.assertEqual(Link('Sandbox').title, 'Sandbox')
File "/home/xzise/Programms/core/pywikibot/page.py", line 3972, in __init__
self._source = source or pywikibot.Site()
File "/home/xzise/Programms/core/pywikibot/__init__.py", line 573, in Site
_sites[key] = interface(code=code, fam=fam, user=user, sysop=sysop)
File "/home/xzise/Programms/core/tests/aspects.py", line 266, in __init__
% (fam, code))
SiteDefinitionError: Loading site test:test during dry test not permitted
As nose executes dry test it shouldn't have passed jenkins. Because the test
worked on Travis (
https://travis-ci.org/wikimedia/pywikibot-core/jobs/39753290#L549 ) so it's
probably not related to jenkins, tox or nose.
Querying 'self.dry' inside a test returned True so it's not like it doesn't set
anything.
--
You are receiving this mail because:
You are the assignee for the bug.