XZise created this task.
XZise added subscribers: XZise, jayvdb.
XZise added projects: pywikibot-core, Pywikibot-compat-to-core.
Restricted Application added subscribers: Aklapper, pywikipedia-bugs.
TASK DESCRIPTION
Hi, the code should use `unicode_literals` throughout to avoid using `u'…'` which is one the reasons why Python 3 versions before 3.3 aren't supported. @jayvdb said somewhere (determine), that he'd prefer to do that in one go. I suggest to atleast do it in all new code, so that changing `u'…'` into `'…'` won't break git blame for those files when it's introduced later. It is possible to use `u'…'` on conjunction with `unicode_literals`, but that could confuse newcomers into thinking that `u'…'` is necessary.
TASK DETAIL
https://phabricator.wikimedia.org/T89589
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: jayvdb, Aklapper, XZise, droid, 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
XZise created this task.
XZise added a subscriber: XZise.
XZise added projects: pywikibot-core, Pywikibot-tests.
Restricted Application added subscribers: Aklapper, pywikipedia-bugs.
TASK DESCRIPTION
Hi, I ran a test on Travis and [[https://travis-ci.org/xZise/pywikibot-core/jobs/51820643|one 2.6 test]] failed and it looks like that one dependency (or more like the dependency of one depencendcy) is using a package which is not compatible with Python 2.6 because it's using sets via curly brackets (`s = {42, 74, 47}`).
Unfortunately that package is not a direct dependency but it looks like that is just compatible with Python 2.7+.
TASK DETAIL
https://phabricator.wikimedia.org/T90441
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: pywikipedia-bugs, Aklapper, XZise, jayvdb
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
jayvdb created this task.
jayvdb added a subscriber: jayvdb.
jayvdb added a project: pywikibot-core.
jayvdb changed Security from none to none.
TASK DESCRIPTION
Probably caused by revision deletion of the page?
https://travis-ci.org/wikimedia/pywikibot-core/jobs/43590174
```
======================================================================
ERROR: testLogEvents (tests.site_tests.SiteUserTestCase)
Test the site.logevents() method.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/wikimedia/pywikibot-core/tests/site_tests.py", line 732, in testLogEvents
for entry in mysite.logevents(logtype=typ, total=3):
File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/data/api.py", line 1512, in __iter__
yield self.result(item)
File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/data/api.py", line 1710, in result
return self.entryFactory.create(pagedata)
File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/logentries.py", line 294, in create
return self._creator(logdata)
File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/logentries.py", line 283, in <lambda>
self._creator = lambda data: logclass(data, self._site)
File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/logentries.py", line 98, in __init__
pos = self.data['title'].find('#')
File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/logentries.py", line 28, in __missing__
raise KeyError("Log entry has no '%s' key" % key, key)
KeyError: ("Log entry has no 'title' key", 'title')
```
TASK DETAIL
https://phabricator.wikimedia.org/T78152
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 added a subscriber: jayvdb.
jayvdb added a project: Pywikibot-tests.
jayvdb changed Security from none to none.
TASK DESCRIPTION
https://travis-ci.org/wikimedia/pywikibot-core/jobs/43953898
```
======================================================================
ERROR: test_logevents_default (tests.pagegenerators_tests.TestLogeventsFactoryGenerator)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/wikimedia/pywikibot-core/tests/pagegenerators_tests.py", line 414, in test_logevents_default
pages = set(gen)
File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/pagegenerators.py", line 726, in LogeventsPageGenerator
yield entry.title()
File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/logentries.py", line 63, in title
self._title = pywikibot.Page(self.site, self.data['title'])
File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/logentries.py", line 28, in __missing__
raise KeyError("Log entry has no '%s' key" % key, key)
KeyError: ("Log entry has no 'title' key", 'title')
```
TASK DETAIL
https://phabricator.wikimedia.org/T78481
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
XZise created this task.
XZise added a subscriber: XZise.
XZise added projects: pywikibot-core, Pywikibot-tests.
TASK DESCRIPTION
I installed a new version of Python and forgot to install `six`. Now when I did `python setup.py test` I got:
```
xzise@localhost:~/Programms/core$ python setup.py test
running test
running egg_info
writing pywikibot.egg-info/PKG-INFO
writing dependency_links to pywikibot.egg-info/dependency_links.txt
writing top-level names to pywikibot.egg-info/top_level.txt
writing requirements to pywikibot.egg-info/requires.txt
reading manifest file 'pywikibot.egg-info/SOURCES.txt'
writing manifest file 'pywikibot.egg-info/SOURCES.txt'
running build_ext
max_retries reduced from 10 to 1 for tests
Disabled test modules (to run: python -m unittest ...):
ui
Extra test modules (run after library, before scripts):
exceptions, thread, timestamp, tk, wikistats
Skipping tests (to run: python -m unittest ...):
{'textlib': ['test_interwiki_format']}
Traceback (most recent call last):
File "setup.py", line 127, in <module>
use_2to3=False
File "/home/xzise/.pyenv/versions/3.4.2/lib/python3.4/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/xzise/.pyenv/versions/3.4.2/lib/python3.4/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/home/xzise/.pyenv/versions/3.4.2/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/xzise/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/command/test.py", line 138, in run
self.with_project_on_sys_path(self.run_tests)
File "/home/xzise/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/command/test.py", line 118, in with_project_on_sys_path
func()
File "/home/xzise/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/command/test.py", line 164, in run_tests
testLoader = cks
File "/home/xzise/.pyenv/versions/3.4.2/lib/python3.4/unittest/main.py", line 92, in __init__
self.parseArgs(argv)
File "/home/xzise/.pyenv/versions/3.4.2/lib/python3.4/unittest/main.py", line 139, in parseArgs
self.createTests()
File "/home/xzise/.pyenv/versions/3.4.2/lib/python3.4/unittest/main.py", line 146, in createTests
self.module)
File "/home/xzise/.pyenv/versions/3.4.2/lib/python3.4/unittest/loader.py", line 146, in loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
File "/home/xzise/.pyenv/versions/3.4.2/lib/python3.4/unittest/loader.py", line 146, in <listcomp>
suites = [self.loadTestsFromName(name, module) for name in names]
File "/home/xzise/.pyenv/versions/3.4.2/lib/python3.4/unittest/loader.py", line 131, in loadTestsFromName
test = obj()
File "/home/xzise/Programms/core/tests/__init__.py", line 159, in collector
discovered = loader.loadTestsFromName(module_class_name)
File "/home/xzise/.pyenv/versions/3.4.2/lib/python3.4/unittest/loader.py", line 114, in loadTestsFromName
parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'textlib_tests'
<class 'AttributeError'>
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
```
But obviously the file was there. Luckily I remembered someone had the same problem I could look into my IRC log and found that I suggested to do `python pwb.py tests/textlib_tests.py` and only then I got the actual error:
```
xzise@localhost:~/Programms/core$ python pwb.py tests/textlib_tests.py
max_retries reduced from 10 to 1 for tests
Traceback (most recent call last):
File "pwb.py", line 221, in <module>
run_python_file(filename, argv, argvu, file_package)
File "pwb.py", line 80, in run_python_file
exec(compile(source, filename, "exec"), main_mod.__dict__)
File "./tests/textlib_tests.py", line 18, in <module>
from tests.aspects import unittest, TestCase, DefaultDrySiteTestCase
File "/home/xzise/Programms/core/tests/aspects.py", line 848, in <module>
import six
ImportError: No module named 'six'
<class 'ImportError'>
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
```
If possible the tests should require `six` and install it before, or stop (with a sensible warning) before, or skip those entries. At least with Python 3.5 we might get a more detailed error message: http://bugs.python.org/issue7559 .
TASK DETAIL
https://phabricator.wikimedia.org/T86640
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 added subscribers: siebrand, jayvdb, valhallasw, pywikipedia-bugs, Ladsgroup, Xqt.
jayvdb added projects: pywikibot-compat, pywikibot-core, Pywikibot-i18n.
Restricted Application added a subscriber: Aklapper.
TASK DESCRIPTION
Pywikibot core & compat still has many strings not migrated to twn. The maintenance script make_i18n_dict.py is able to extract a message dict from in a script, and migrate it to twn's python format, which appears to no longer be operational. make_i18n_dict.py needs to be enhanced to also create message bundles in twn's JSON format.
TASK DETAIL
https://phabricator.wikimedia.org/T87231
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: Xqt, Ladsgroup, valhallasw, jayvdb, siebrand, Aklapper, Anshoe, pywikipedia-bugs