replace underscores with spaces in BaseSite._username

Following bug 61832 comment 3 suggestion a)

Change-Id: Ibaa00e00bc61c734955e1377604241541eab336b
Log package versions

The version of major dependencies 'httplib2' and 'mwparserfromhell'
shoud be written to the log, and included in the script version.py.

In verbose mode it is helpful to see what other major packages are
being automatically loaded into the python environment, and their
versions.

Move the online startup checks after the local checks.

Change-Id: Iae9f73b23ab1eb1a4acce46a690c0b4f9f9396a8
standardize movepages.py

MovePagesBot extends pywikibot.Bot with an options dict
and built-in 'always' option

minor optimization: call pywikibot.Site() only once

Change-Id: Ia2fe3742d42e351ccc1401320d88c0096f632595
Add option of user_agent in user-config.py

It will use a format string and people can change it

Change-Id: If1bfcbb62e0bf126abc2b5847d03e7e004c7bfe4
Support list of encodings for url2unicode.

Decouples url2unicode from Site objects, so it
may be used in code where a Site is not relevant.

Change-Id: I9ca2a933d227afa79de8ce402304592682785d17
call handleArgs before local args are processed

Change-Id: I0f710087291d74ab423f44088551708f97a21ff8
Pep257

Change-Id: Iea114b85f8623451a551409f485ba7346536ebd0
Verify each script compiles and runs

Adds a set of tests covering compilation and execution of
scripts where possible, with limited verification of the
output of each script.

Invoke tests for all dependencies using:
$ PYSETUP_TEST_EXTRAS=yes python setup.py test

Change-Id: I836b641c5e315abc0c8eebf130885294d26ffd01
Remove imageuncat from script tests

imageuncat is causing the travis builds to halt.

Also replace 'PIL' with module name 'ImageTk' in dependency check.

Change-Id: If188c217f2d193da1b6333f04191e320d2e795b5
Fixup for recent standardisation of nowcommons

Fixes I1cc6b5734237d143c8100f3c26c20d78c36924c6

Change-Id: I14ea9f7be0bc0df363a2fe2945a068753645598f
Merge "Remove imageuncat from script tests"
Add expected failures for build errors on travis

Change-Id: Icde3cc4b9bc427f9ba022fa43afb092ffb0f99cc
Script test fixes for py2.6

unittest2 on py2.6 on travis reports the following warning and
returns a non-zero exit code for the test suite when a test
is unexpectedly successful.

DeprecationWarning: Use of a TestResult without an addUnexpectedSuccess
method is deprecated

Several of our tests fail only on one site (en.wp, ar.wp or wd), or on
other conditions which cant be predicted.

This test removes use of unexpected success from the tests.

Change-Id: Ic2a4be02871f9eda2c40744935392985cd7a6a01
Merge "call handleArgs before local args are processed"
py2.6 test fix: welcome breaks unreliably

Change-Id: I049a4c864a25972fad5e13399f186c649da67331
Fix cache key for non-Latin sites

Avoiding using Page.__repr__() as it uses the localized namespace name
and encodes the title into the console encoding, which causes problems
when _create_file_name() tries to encode it again.

Bug: 67488

Change-Id: If49039bac8e8347852c1a04963f678903621d2a9
Fix docstring: Pagegenerators doesn't run as script

Docstring aligned to script behaviour.

Change-Id: Ic4a905bf24aad74d68f61100bdee21f0bb810a60
Test harness for scripts should login first

If the login does not happen first, the first script that attempts
to login will unexpectedly emit
    Logging in to <site> as <user>

Change-Id: I41111456149aab7da02613e581e692d4e1058b31
Merge "Fix cache key for non-Latin sites"
Remove categories only containing files

Also avoid hitting the server twice

Bug: 68705

Change-Id: Idaa1bb7983e6b052e83e258d2b2b588c4385d62c