jayvdb created this task.
jayvdb added a subscriber: jayvdb.
jayvdb added a project: pywikibot-core.
jayvdb changed Security from none to none.
TASK DESCRIPTION
I can reliably produce a badtoken by running the entire test suite on ar.wp or test.wd on this change:
https://gerrit.wikimedia.org/r/178453
TASK DETAIL
https://phabricator.wikimedia.org/T77965
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
To: jayvdb
Cc: Aklapper, jayvdb, pywikipedia-bugs
jayvdb created this task.
jayvdb added subscribers: pywikipedia-bugs, jayvdb, XZise.
jayvdb added a project: pywikibot-core.
TASK DESCRIPTION
generating family files can create break site.interwiki .
```
$ python pwb.py generate_family_file.py http://wiki-commons.genealogy.net/Hauptseite genealogy2
Generating family file from http://wiki-commons.genealogy.net/Hauptseite
==================================
api url: http://wiki-commons.genealogy.net/w/api.php
MediaWiki version: 1.14.1
==================================
Determining other languages...de en nl
There are 4 languages available.
Do you want to generate interwiki links? This might take a long time. ([y]es/[N]o/[e]dit)y
Loading wikis...
* de... 'utf8' codec can't decode byte 0xfc in position 26478: invalid start byte
* en... downloaded
* nl... downloaded
* de... in cache
Writing pywikibot/families/genealogy2_family.py...
pywikibot/families/genealogy2_family.py already exists. Overwrite? (y/n)y
[jayvdb@localhost new]$ cat pywikibot/families/genealogy2_family.py
# -*- coding: utf-8 -*-
"""
This family file was auto-generated by $Id: 2dd21e4aaf7a93cf8749be841552881a80684b52 $
Configuration parameters:
url = http://wiki-commons.genealogy.net/Hauptseite
name = genealogy2
Please do not commit this to the Git repository!
"""
from pywikibot import family
class Family(family.Family):
def __init__(self):
family.Family.__init__(self)
self.name = 'genealogy2'
self.langs = {
'nl': 'wiki-nl.genealogy.net',
'de': 'wiki-commons.genealogy.net',
'en': 'wiki-en.genealogy.net',
}
def scriptpath(self, code):
return {
'nl': '/w',
'de': '/w',
'en': '/w',
}[code]
def version(self, code):
return {
'nl': u'1.14.1',
'de': u'1.14.1',
'en': u'1.14.1',
}[code]
```
That family has three different hostnames, and the keys are different to the subdomain. That might be relevant.
When I alter APISite._cache_interwikimap to re-raise the Error it catches, we see
```
$ python -m unittest tests.link_tests.TestFullyQualifiedNoLangFamilyImplicitLinkParser.test_fully_qualified_NS1_family
max_retries reduced from 25 to 1 for tests
======================================================================
ERROR: test_fully_qualified_NS1_family (tests.link_tests.TestFullyQualifiedNoLangFamilyImplicitLinkParser)
Test 'wikidata:testwiki:Talk:Q6' on enwp is namespace 1.
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/link_tests.py", line 813, in test_fully_qualified_NS1_family
link.parse()
File "pywikibot/page.py", line 4189, in parse
newsite = self._site.interwiki(prefix)
File "pywikibot/site.py", line 692, in interwiki
self._cache_interwikimap()
File "pywikibot/site.py", line 676, in _cache_interwikimap
site = (pywikibot.Site(url=iw['url']), 'local' in iw)
File "pywikibot/__init__.py", line 564, in Site
code = family.from_url(url)
File "pywikibot/family.py", line 1076, in from_url
'\$1'.format(self._get_path_regex()), url)
File "pywikibot/family.py", line 1058, in _get_path_regex
'family.'.format(self.name))
Error: Pywikibot is unable to generate an automatic path regex for the family genealogy2. It is recommended to overwrite "_get_path_regex" in that family.
----------------------------------------------------------------------
Ran 1 test in 2.645s
FAILED (errors=1)
```
TASK DETAIL
https://phabricator.wikimedia.org/T85658
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb
Cc: Aklapper, jayvdb, XZise, pywikipedia-bugs
jayvdb created this task.
jayvdb claimed this task.
jayvdb added a subscriber: jayvdb.
jayvdb added a project: Pywikibot-tests.
TASK DESCRIPTION
aspects.py provides similar functionality to the package testscenarios. https://pypi.python.org/pypi/testscenarios
Features of aspects that are missing should be added to testscenarios, so that we could adopt it by essentially renaming TestCase.sites to TestCase,scenarios , plus any parts of aspects that may not be able to be easily generalised.
TASK DETAIL
https://phabricator.wikimedia.org/T85899
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb
Cc: Aklapper, jayvdb, pywikipedia-bugs
jayvdb created this task.
jayvdb claimed this task.
jayvdb added subscribers: pywikipedia-bugs, valhallasw, siebrand, Nemo_bis, jayvdb.
jayvdb added projects: Pywikibot-i18n, i18n.
TASK DESCRIPTION
JSON files have been added to pywikibot/i18n, which now has python and JSON files with the same messages. The JSON files are not used yet, as the code changes to enable JSON have exposed packaging problems that are the subject of RFC https://www.mediawiki.org/wiki/Requests_for_comment/pywikibot_2.0_packaging
We need syntax validation of these JSON files for gerrit submissions, as message changes typically need to be approved quickly (and without errors) so they can be merged and the core & compat i18n submodule updated, before the messages can be used in code changes.
TASK DETAIL
https://phabricator.wikimedia.org/T85335
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb
Cc: Aklapper, valhallasw, siebrand, Nemo_bis, jayvdb, Gryllida, Shizhao, Arrbee, pywikipedia-bugs
jayvdb created this task.
jayvdb claimed this task.
jayvdb added subscribers: jayvdb, Legoktm, hashar.
jayvdb added projects: Continuous-Integration, pywikibot-core.
Restricted Application added subscribers: Aklapper, pywikipedia-bugs.
TASK DESCRIPTION
As jenkins will no longer automatically run rules in tox.ini, we need to hardwire pep8 and pep257 into jenkins, like the mediawiki lint tests.
pep8 runs without arguments, using the config in tox.ini for the exclude and ignore list.
pep257 doesn't have an exclude parameter (yet), but looks like they are interested in that feature:
https://github.com/GreenSteam/pep257/pull/22#issuecomment-70471875
While waiting for feedback on adding exclude to pep257, it would be nice if we didnt need an exclude list .. ;-)
date.py is being ignored by flake8, but is processed by pep257, so I've tackled that.
https://gerrit.wikimedia.org/r/#/c/185815/
pep257 is validating ez_setup.py , which I've tried to fix at the source of the problem:
https://bitbucket.org/pypa/setuptools/pull-request/117/pep8-and-pep257-comp…
pep257 doesnt ignore items with '# noqa' , so it is emitting errors for interwiki.py (easy) and pywikibot/exceptions.py (messy).
Also if the job is hardwired into jenkins, and we can only maintain one match list in tox.ini , we cant reimplement the 'mandatory docstring' list without some serious cleanup first.
TASK DETAIL
https://phabricator.wikimedia.org/T87169
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb
Cc: hashar, Legoktm, jayvdb, Aklapper, greg, pywikipedia-bugs
XZise created this task.
XZise added a subscriber: XZise.
XZise added a project: pywikibot-core.
TASK DESCRIPTION
Similar to T74847 the wikibase settings are hardcoded into the family files. There is [[https://en.wikipedia.org/w/api.php?action=query&meta=wikibase|`action=query…]] which would allow to make dynamically if the API plays along. In T74847 a very nasty problem surfaced which made it at least very hard to determine the Site object parameter (basically which family and code it uses) based on the result (see T85153).
So part of this task is also to determine if this API call has the same problem so other wikibase installations in the wild should be queried (or more exact: installations which use another wikibase). At least from the result of the English Wikipedia it should be easy to get a Site object because it's possible to construct the URL similar to the interwiki map URL for which we already have an implementation.
TASK DETAIL
https://phabricator.wikimedia.org/T85331
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: XZise
Cc: Aklapper, XZise, jayvdb, pywikipedia-bugs
jayvdb created this task.
jayvdb claimed this task.
jayvdb added a subscriber: jayvdb.
jayvdb added a project: Pywikibot-Other-scripts.
Restricted Application added subscribers: Aklapper, pywikipedia-bugs.
TASK DESCRIPTION
This script describes itself as
"Script to copy images to Wikimedia Commons, or to another wiki."
However, it will only transfer files to Wikimedia Commons in compat, or the shared file repo in core.
In compat, it doesnt transfer files when fileIsOnCommons() is true.
In core, it doesnt transfer files when fileIsShared is true.
The 'fileIsonCommons' check was added in February 2007
https://mediawiki.org/wiki/Special:Code/pywikipedia/3286
I am unable to see why that was necessary, as it did already have a check whether the page is on the target site, and it would sys.exit if it was on the target site!
http://git.wikimedia.org/blob/pywikibot%2Fcompat.git/261583094f7912cc7bab81…
TASK DETAIL
https://phabricator.wikimedia.org/T87082
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb
Cc: pywikipedia-bugs, jayvdb, Aklapper
jayvdb created this task.
jayvdb added a subscriber: jayvdb.
jayvdb added a project: pywikibot-core.
TASK DESCRIPTION
There is an open pull request for a py3 problem, but our unit tests must not hit this section of code, or something
https://github.com/invisibleroads/socketIO-client/pull/60
However our unit tests fail on py 2.6
https://travis-ci.org/wikimedia/pywikibot-core/jobs/45687549
```
test_RC_pagegenerator_result (tests.pagegenerators_tests.LiveRCPageGeneratorTestCase) ... /home/travis/build/wikimedia/pywikibot-core/websocket_client-0.23.0-py2.6.egg/websocket/_core.py:223: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
message = getattr(exception, 'message', '')
No handlers could be found for logger "socketIO_client"
No output has been received in the last 10 minutes, this potentially indicates a stalled build or something wrong with the build itself.
The build has been terminated
```
TASK DETAIL
https://phabricator.wikimedia.org/T85716
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb
Cc: Aklapper, jayvdb, pywikipedia-bugs
jayvdb created this task.
jayvdb assigned this task to valhallasw.
jayvdb added a subscriber: jayvdb.
jayvdb added projects: pywikibot-core, Pywikibot-pagegenerators.
TASK DESCRIPTION
In the event of a problem in socketio_client, the log messages are discarded, with the logging layer emitting one notice to indicate that this has happened:
```
No handlers could be found for logger "socketIO_client"
```
When a logger was added for T85717 , we see that the problem was a critical disconnection, with an informative message:
```
WARNING:socketIO_client:[connection error] connection closed ()
```
I'm not sure that adding a socketIO_client" logger is the right thing to do. Ideally, pywikibot is catching exceptions and these messages are logged using the "pywiki-rcstream" logger. But we need logging soon, if we're to diagnose problems that occur.
As pywikibot is not currently catching this exception (which I believe is coming from websocket), we need to investigate that. Communication of important connection status changes might be happening via other mechanisms, like the generic handlers or by callbacks.
TASK DETAIL
https://phabricator.wikimedia.org/T86506
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: valhallasw, jayvdb
Cc: Aklapper, jayvdb, pywikipedia-bugs