https://bugzilla.wikimedia.org/show_bug.cgi?id=72424
Bug ID: 72424
Summary: ModuleDeprecationWrapper breaks epydoc
Product: Pywikibot
Version: compat (1.0)
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: documentation
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: jayvdb(a)gmail.com
Web browser: ---
Mobile Platform: ---
epydoc documentation was broken with the introduction of
ModuleDeprecationWrapper in __init__.
$ epydoc --debug pywikibot
Warning: Module pywikibot is shadowed by a variable with the same name.
Traceback (most recent call last): Progress:
28:32
File "/usr/bin/epydoc", line 13, in
<module>-----------------------------------------------------------------------------------------------]
cli() Building documentation: pywikibot'.i18n
(.../pywikibot/i18n.pyc)
File "/usr/lib/python2.7/dist-packages/epydoc/cli.py", line 965, in cli
main(options, names)
File "/usr/lib/python2.7/dist-packages/epydoc/cli.py", line 757, in main
exclude_parse=exclude_parse)
File "/usr/lib/python2.7/dist-packages/epydoc/docbuilder.py", line 206, in
build_doc_index
doc_pairs = _get_docs_from_items(items, options)
File "/usr/lib/python2.7/dist-packages/epydoc/docbuilder.py", line 398, in
_get_docs_from_items
item, doc_pairs[-1], options, progress_estimator)
File "/usr/lib/python2.7/dist-packages/epydoc/docbuilder.py", line 595, in
_get_docs_from_submodules
module_filename, options, progress_estimator, pkg_docs)
File "/usr/lib/python2.7/dist-packages/epydoc/docbuilder.py", line 541, in
_get_docs_from_module_file
filename=filename, context=parent_docs[0])
File "/usr/lib/python2.7/dist-packages/epydoc/docintrospecter.py", line 106,
in introspect_docs
value = get_value_from_filename(filename, context)
File "/usr/lib/python2.7/dist-packages/epydoc/docintrospecter.py", line 828,
in get_value_from_filename
pkg_dir = os.path.split(context.filename)[0]
AttributeError: 'GenericValueDoc' object has no attribute 'filename'
removing the last two lines of __init__.py fixes that problem, but likely
others exist; here is the output after that is removed, showing mostly a
problem with the deprecators/redirectors.
$ epydoc --debug pywikibot
+-------------------------------------------------------------------------------------------------------------------------------------------
| In .../pywikibot/botirc.py:
| Import failed (but source code parsing was successful).
| Error: ImportError: No module named ircbot (line 23)
|
Warning: No information available for
pywikibot.data.api.CTEBinaryBytesGenerator's base
email.generator.BytesGenerator
Warning: No information available for
pywikibot.data.api.CTEBinaryMIMEMultipart's base
email.mime.multipart.MIMEMultipart
Warning: No information available for
pywikibot.data.api.CTEBinaryBytesGenerator's base
email.generator.BytesGenerator
Warning: No information available for
pywikibot.data.api.CTEBinaryMIMEMultipart's base
email.mime.multipart.MIMEMultipart
Debug: <RoutineDoc pywikibot.categoryFormat> is in <ModuleDoc
pywikibot.tools> but name does not dominate
Debug: <RoutineDoc pywikibot.compileLinkR> is in <ModuleDoc pywikibot.tools>
but name does not dominate
Debug: <RoutineDoc pywikibot.extract_templates_and_params> is in <ModuleDoc
pywikibot.tools> but name does not dominate
Debug: <RoutineDoc pywikibot.getCategoryLinks> is in <ModuleDoc
pywikibot.tools> but name does not dominate
Debug: <RoutineDoc pywikibot.getLanguageLinks> is in <ModuleDoc
pywikibot.tools> but name does not dominate
Debug: <RoutineDoc pywikibot.interwikiFormat> is in <ModuleDoc
pywikibot.tools> but name does not dominate
Debug: <RoutineDoc pywikibot.interwikiSort> is in <ModuleDoc pywikibot.tools>
but name does not dominate
Debug: <RoutineDoc pywikibot.isDisabled> is in <ModuleDoc pywikibot.tools>
but name does not dominate
Debug: <RoutineDoc pywikibot.removeCategoryLinks> is in <ModuleDoc
pywikibot.tools> but name does not dominate
Debug: <RoutineDoc pywikibot.removeCategoryLinksAndSeparator> is in
<ModuleDoc pywikibot.tools> but name does not dominate
Debug: <RoutineDoc pywikibot.removeDisabledParts> is in <ModuleDoc
pywikibot.tools> but name does not dominate
Debug: <RoutineDoc pywikibot.removeHTMLParts> is in <ModuleDoc
pywikibot.tools> but name does not dominate
Debug: <RoutineDoc pywikibot.removeLanguageLinks> is in <ModuleDoc
pywikibot.tools> but name does not dominate
Debug: <RoutineDoc pywikibot.removeLanguageLinksAndSeparator> is in
<ModuleDoc pywikibot.tools> but name does not dominate
Debug: <RoutineDoc pywikibot.replaceCategoryInPlace> is in <ModuleDoc
pywikibot.tools> but name does not dominate
Debug: <RoutineDoc pywikibot.replaceCategoryLinks> is in <ModuleDoc
pywikibot.tools> but name does not dominate
Debug: <RoutineDoc pywikibot.replaceExcept> is in <ModuleDoc pywikibot.tools>
but name does not dominate
Debug: <RoutineDoc pywikibot.replaceLanguageLinks> is in <ModuleDoc
pywikibot.tools> but name does not dominate
Debug: <RoutineDoc pywikibot.unescape> is in <ModuleDoc pywikibot.tools> but
name does not dominate
Debug: <RoutineDoc pywikibot.site.APISite.forceLogin> is in <ModuleDoc
pywikibot.tools> but name does not dominate
Debug: <RoutineDoc pywikibot.site.BaseSite.getNamespaceIndex> is in
<ModuleDoc pywikibot.tools> but name does not dominate
Debug: <RoutineDoc pywikibot.site.BaseSite.normalizeNamespace> is in
<ModuleDoc pywikibot.tools> but name does not dominate
Warning: 304 markup errors were found while processing docstrings. Use the
verbose switch (-v) to display markup errors.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=72854
Bug ID: 72854
Summary: MW API version problems [tracking]
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: Unprioritized
Component: network
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: jayvdb(a)gmail.com
Web browser: ---
Mobile Platform: ---
Tracking bug for problems with versions of MW API, especially older versions.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=70987
Bug ID: 70987
Summary: py2.6 bugs [tracking]
Product: Pywikibot
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: jayvdb(a)gmail.com
Web browser: ---
Mobile Platform: ---
Tracking bug for issues only found on py2.6 on compat or core
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=72873
Bug ID: 72873
Summary: Family detection [tracking]
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: ---
When creating a Family class with generate_family_file (or adding functionality
to AutoFamily) not all family features are currently detected:
- shared image repository
- shared data repository
- disambiguationTemplates/category_redirect_templates/disambcatname
- interwiki
- encoding (if not utf8)/latin1old/code2encodings
- other?
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=73533
Bug ID: 73533
Summary: login requests password when the API says the username
doesnt exist
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: major
Priority: Unprioritized
Component: login.py
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: jayvdb(a)gmail.com
Web browser: ---
Mobile Platform: ---
The API returns result 'NotExists', but pywikibot prompts for a password
DEBUG:pywiki.data.api:API response received from vikidia:en:
{"login":{"result":"NotExists"}}
ERROR: Login failed (NotExists).
ERROR:pywiki:Login failed (NotExists).
Password for user Jayvdb on vikidia:en (no characters will be shown):
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=73561
Bug ID: 73561
Summary: API incompatibility in Site.pagecategories and
Page.categories: withSortKey not supported
Product: Pywikibot
Version: core-(2.0)
Hardware: All
OS: All
Status: NEW
Severity: major
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: jayvdb(a)gmail.com
Web browser: ---
Mobile Platform: ---
Site.pagecategories in core does not accept the parameter withSortKey which was
present in compat, and no alternative implementation is available.
Page.categories in core even exposes a withSortKey parameter, which is passes
to Site.pagecategories, only for it to be ignored.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=73461
Bug ID: 73461
Summary: preloading using multiple properties does not work
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: major
Priority: Unprioritized
Component: network
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: jayvdb(a)gmail.com
Web browser: ---
Mobile Platform: ---
interwiki uses the templates=True and langlinks=True functionality provided by
APISite.preloadpages
>>> site.preloadpages(pageGroup, templates=True, langlinks=True)
However, it does not work. Continuation for langlinks & templates fails. Only
the revisions continuation is performed.
I presume it has never worked, as the commit that added it did not do anything
related to handling of multiple continuations
http://git.wikimedia.org/commit/pywikibot%2Fcore.git/aa8739dc5ff876b71e42cc…
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=73489
Bug ID: 73489
Summary: redirect.py fails with -moves option
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: major
Priority: Unprioritized
Component: redirect.py
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: info(a)gno.de
Web browser: ---
Mobile Platform: ---
redirect.py fails with -moves option:
C:\pwb\core>pwb.py redirect.py do -always -moves
Retrieving all moved pages via API...
............................
>>> Rosetta-Lander <<<
Links to: [[Philae (Sonde)]].
Links to: [[Philae]].
Traceback (most recent call last):
File "C:\pwb\core\pwb.py", line 181, in <module>
run_python_file(fn, argv, argvu)
File "C:\pwb\core\pwb.py", line 75, in run_python_file
exec(compile(source, filename, "exec"), main_mod.__dict__)
File "C:\pwb\core\scripts\redirect.py", line 821, in <module>
main()
File "C:\pwb\core\scripts\redirect.py", line 818, in main
bot.run()
File "C:\pwb\core\scripts\redirect.py", line 721, in run
self.fix_double_redirects()
File "C:\pwb\core\scripts\redirect.py", line 528, in fix_double_redirects
self.fix_1_double_redirect(redir_name)
File "C:\pwb\core\scripts\redirect.py", line 665, in fix_1_double_redirect
'#%s %s' % (self.site.redirect(True),
File "C:\pwb\core\pywikibot\tools.py", line 647, in wrapper
return obj(*__args, **__kw)
TypeError: redirect() takes exactly 1 argument (2 given)
<type 'exceptions.TypeError'>
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
C:\pwb\core>
corresponding version is:
C:\pwb\core>pwb.py version
Pywikibot: pywikibot-core (f12709d, s5607, 2014/11/16, 00:47:43, ok)
Release version: 2.0b2
httplib2 version: 0.9
cacerts: C:\pwb\core\externals\httplib2\python2\httplib2\cacerts.txt
certificate test: ok
Python: 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)]
unicode test: ok
Older code does still the job well:
c:\Pywikipedia\ssh\pywikibot\core>pwb.py version.py
Pywikibot: [ssh] pywikibot-core (dfdc0c9, g4462, 2014/11/03, 07:43:21,
OUTDATED)
Release version: 2.0b2
httplib2 version: 0.9
cacerts:
C:\Pywikipedia\ssh\pywikibot\core\externals\httplib2\python2\httplib2
\cacerts.txt
certificate test: ok
Python: 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)]
unicode test: ok
c:\Pywikipedia\ssh\pywikibot\core>
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=73539
Bug ID: 73539
Summary: Unhandled API login error codes
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: ---
The login has many error codes which are unhandled.
http://www.wikia.com/api.php?format=jsonfm&modules=login&action=paraminfo
Bug 73533 will handle the most critical ones, however the others need to be
handled, and that will require more detailed analysis.
For example, 'Blocked', found in 1.19 paraminfo.
The API allows blocked users to login, but prevents them from editing, etc.
Therefore, API login error code 'Blocked' may not needed in modern API usage.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=73513
Bug ID: 73513
Summary: Tests fail on Wikia
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: jayvdb(a)gmail.com
Web browser: ---
Mobile Platform: ---
It would be good to add another farm to our test builds. We have a few Wikia
already in family files, and other family classes are -2'd , so Wikia it is.
Here are the Wikia failures (using py3):
api_tests.TestParamInfo.test_new_mode
Traceback (most recent call last):
File "./tests/api_tests.py", line 231, in test_new_mode
pi.fetch(['info'])
File "./pywikibot/data/api.py", line 268, in fetch
self._init()
File "./pywikibot/data/api.py", line 202, in _init
main_modules_param = self.parameter('main', 'action')
File "./pywikibot/data/api.py", line 379, in parameter
self.fetch(set([module]))
File "./pywikibot/data/api.py", line 281, in fetch
assert(self._query_modules or _init)
AssertionError
site_tests.TestSiteTokens.test_tokens_in_mw_119
Traceback (most recent call last):
File "./tests/site_tests.py", line 1239, in test_tokens_in_mw_119
self._test_tokens(None, '1.19', 'edit', 'delete')
File "./tests/site_tests.py", line 1235, in _test_tokens
self.assertIn(in_tested, self.mysite.tokens)
AssertionError: 'edit' not found in {'Jayvdb': {}}
site_tests.TestSiteObjectDeprecatedFunctions.test_token
Traceback (most recent call last):
File "./tests/site_tests.py", line 57, in test_token
token = mysite.tokens[ttype]
File "./pywikibot/site.py", line 1341, in __getitem__
.format(key, self.site.user(), self.site))
pywikibot.exceptions.Error: Action 'edit' is not allowed for user Jayvdb on
wikia:wikia wiki.
site_tests.SiteUserTestCase.testSearch
Traceback (most recent call last):
File "./tests/site_tests.py", line 887, in testSearch
se = list(mysite.search("wiki", total=100))
File "./pywikibot/data/api.py", line 1452, in __iter__
self.data = self.request.submit()
File "./pywikibot/data/api.py", line 1071, in submit
raise APIError(code, info, **result["error"])
pywikibot.data.api.APIError: gsrsearch-text-disabled: text search is disabled
site_tests.SiteUserTestCase2.testPatrol
Traceback (most recent call last):
File "./pywikibot/site.py", line 1323, in __getitem__
key = self.site.validate_tokens([key])[0]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./tests/site_tests.py", line 1155, in testPatrol
result = list(mysite.patrol(rcid=rc['rcid']))
File "./pywikibot/site.py", line 4232, in patrol
token = self.tokens['patrol']
File "./pywikibot/site.py", line 1327, in __getitem__
.format(key, self.site))
pywikibot.exceptions.Error: Requested token 'patrol' is invalid on wikia:wikia
wiki.
page_tests.TestPageObject.testLinks
Traceback (most recent call last):
File "./tests/page_tests.py", line 461, in testLinks
iw = list(mainpage.interwiki(expand=True))
File "./pywikibot/page.py", line 1150, in interwiki
text = self.expand_text()
File "./pywikibot/tools.py", line 647, in wrapper
return obj(*__args, **__kw)
File "./pywikibot/page.py", line 499, in expand_text
includecomments=includecomments)
File "./pywikibot/site.py", line 992, in callee
return fn(self, *args, **kwargs)
File "./pywikibot/site.py", line 1958, in expand_text
return req.submit()['expandtemplates'][key]
File "./pywikibot/data/api.py", line 1213, in submit
self._data = super(CachedRequest, self).submit()
File "./pywikibot/data/api.py", line 1071, in submit
raise APIError(code, info, **result["error"])
pywikibot.data.api.APIError: notext: The text parameter must be set
wikibase_tests.TestPageMethods.test_item_templates
Traceback (most recent call last):
File "./tests/wikibase_tests.py", line 554, in test_item_templates
self.wdp.templatesWithParams()
File "./pywikibot/tools.py", line 647, in wrapper
return obj(*__args, **__kw)
File "./pywikibot/page.py", line 1288, in templatesWithParams
templates = textlib.extract_templates_and_params(self.text)
File "./pywikibot/textlib.py", line 973, in extract_templates_and_params
return extract_templates_and_params_regex(text)
File "./pywikibot/textlib.py", line 1000, in
extract_templates_and_params_regex
thistxt = removeDisabledParts(text)
File "./pywikibot/textlib.py", line 327, in removeDisabledParts
return toRemoveR.sub('', text)
TypeError: expected string or buffer
(this one is unrelated I believe.. but I thought we fixed this??)
Many of these require the test suite to be a bit more intelligent about user
rights.
--
You are receiving this mail because:
You are the assignee for the bug.