jenkins-bot has submitted this change and it was merged.
Change subject: Use test.wikidata as travis default site
......................................................................
Use test.wikidata as travis default site
Unit tests should not depend on config default site in order to
function correctly.
This change ensures that any tests which do depend on the config
default site are identified and fixed quickly.
The default needs to be a WMF wiki, and wikidata is the most different
to the other WMF families as namespace 0 is not wikitext, which should
help break tests which are assuming a default site of Wikipedia.
Change-Id: Iad16d81f5e993ee320a4b56f670baf5649d16f93
---
M .travis.yml
1 file changed, 3 insertions(+), 3 deletions(-)
Approvals:
Legoktm: Looks good to me, approved
jenkins-bot: Verified
diff --git a/.travis.yml b/.travis.yml
index 9a89d86..2b8b3a1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -9,9 +9,9 @@
- touch ~/.pywikibot/user-config.py
- echo "import os" >> ~/.pywikibot/user-config.py
- - echo "mylang = 'en'" >> ~/.pywikibot/user-config.py
- - echo "family = 'wikipedia'" >> ~/.pywikibot/user-config.py
- - echo "usernames['wikipedia']['en'] = 'Pywikibot-test'" >> ~/.pywikibot/user-config.py
+ - echo "mylang = 'test'" >> ~/.pywikibot/user-config.py
+ - echo "family = 'wikidata'" >> ~/.pywikibot/user-config.py
+ - echo "usernames['wikidata']['test'] = 'Pywikibot-test'" >> ~/.pywikibot/user-config.py
- echo "password_file = os.path.expanduser('~/.pywikibot/passwordfile')" >> ~/.pywikibot/user-config.py
- touch ~/.pywikibot/passwordfile
--
To view, visit https://gerrit.wikimedia.org/r/142508
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iad16d81f5e993ee320a4b56f670baf5649d16f93
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Legoktm <legoktm.wikipedia(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: Fix httplib2 0.6.0 support
......................................................................
Fix httplib2 0.6.0 support
- fix httplib2 0.6.0 version string, otherwise StrictVersion fails
- add missing SSLHandshakeError
Change-Id: Idc58f303ca873075b96f3c78beb73dc11e8f24ab
---
M pwb.py
M pywikibot/comms/http.py
2 files changed, 15 insertions(+), 3 deletions(-)
Approvals:
John Vandenberg: Looks good to me, but someone else must approve
Legoktm: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pwb.py b/pwb.py
index a375826..c8f0cf8 100644
--- a/pwb.py
+++ b/pwb.py
@@ -109,15 +109,19 @@
except ImportError as e:
print("ImportError: %s" % e)
print("Python module httplib2 >= 0.6.0 is required.")
- print("Did you clone without --recursive?"
+ print("Did you clone without --recursive?\n"
"Try running 'git submodule update --init'.")
sys.exit(1)
+# httplib2 0.6.0 was released with __version__ as '$Rev$'
+# and no module variable CA_CERTS.
+if httplib2.__version__ == '$Rev$' and 'CA_CERTS' not in httplib2.__dict__:
+ httplib2.__version__ = '0.6.0'
from distutils.version import StrictVersion
if StrictVersion(httplib2.__version__) < StrictVersion("0.6.0"):
print("Python module httplib2 (%s) needs to be 0.6.0 or greater." %
httplib2.__file__)
- print("Did you clone without --recursive?"
+ print("Did you clone without --recursive?\n"
"Try running 'git submodule update --init'.")
sys.exit(1)
diff --git a/pywikibot/comms/http.py b/pywikibot/comms/http.py
index cae3ab0..95d0cdc 100644
--- a/pywikibot/comms/http.py
+++ b/pywikibot/comms/http.py
@@ -33,13 +33,21 @@
sys.exit(1)
from distutils.version import StrictVersion
+# httplib2 0.6.0 was released with __version__ as '$Rev$'
+# and no module variable CA_CERTS.
+if httplib2.__version__ == '$Rev$' and 'CA_CERTS' not in httplib2.__dict__:
+ httplib2.__version__ = '0.6.0'
if StrictVersion(httplib2.__version__) < StrictVersion("0.6.0"):
print("Error: Python module httplib2 (%s) is not 0.6.0 or greater." %
httplib2.__file__)
sys.exit(1)
if sys.version_info[0] == 2:
- from httplib2 import SSLHandshakeError
+ if 'SSLHandshakeError' in httplib2.__dict__:
+ from httplib2 import SSLHandshakeError
+ elif httplib2.__version__ == '0.6.0':
+ from httplib2 import ServerNotFoundError as SSLHandshakeError
+
import Queue
import urlparse
import cookielib
--
To view, visit https://gerrit.wikimedia.org/r/141639
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Idc58f303ca873075b96f3c78beb73dc11e8f24ab
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Legoktm <legoktm.wikipedia(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Mineo <themineo(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: Remove warning from docstring in blockpageschecker
......................................................................
Remove warning from docstring in blockpageschecker
The warning is not valid as the necessary 'preferences' are
not user preferences, but are per wiki configuration, and
that configuration is in place for six wikis which are
listed in variable 'project_inserted'. A warning is given
when the script is run with a different language code.
The IRC channel name is out of date, and directions on where
to seek help should be provided for the entire package rather than
in an individual script docstring.
Change-Id: I2a76b4e813ba3bc5d9cb00a89075a4f095c586fa
---
M scripts/blockpageschecker.py
1 file changed, 0 insertions(+), 7 deletions(-)
Approvals:
John Vandenberg: Looks good to me, but someone else must approve
Legoktm: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/blockpageschecker.py b/scripts/blockpageschecker.py
index 44a595a..770d906 100755
--- a/scripts/blockpageschecker.py
+++ b/scripts/blockpageschecker.py
@@ -37,13 +37,6 @@
-move The bot will check if the page is blocked also for the move
option, not only for edit
---- Warning! ---
-You have to edit this script in order to add your preferences
-otherwise the script won't work!
-
-If you have problems, ask on botwiki ( http://botwiki.sno.cc/wiki/Main_Page )
-or on IRC (#pywikipediabot)
-
--- Example of how to use the script ---
python blockpageschecker.py -always
--
To view, visit https://gerrit.wikimedia.org/r/147019
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2a76b4e813ba3bc5d9cb00a89075a4f095c586fa
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Legoktm <legoktm.wikipedia(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: document changes in standards for command-line arguments
......................................................................
document changes in standards for command-line arguments
scripts that use unnamed arguments to build page titles
(often through lists named titleParts or pageTitle)
are going to change:
http://lists.wikimedia.org/pipermail/pywikipedia-l/2014-June/008905.html
also fixed a typo
Change-Id: I3d0c64bd0f4aac2a2c3cf375d84e77cb364868ad
---
M README-conversion.txt
1 file changed, 13 insertions(+), 1 deletion(-)
Approvals:
John Vandenberg: Looks good to me, approved
jenkins-bot: Verified
diff --git a/README-conversion.txt b/README-conversion.txt
index c034db8..b344c33 100644
--- a/README-conversion.txt
+++ b/README-conversion.txt
@@ -42,7 +42,7 @@
pwb.py maintenance/compat2core [<script to convert>]
and follow the instructions and hints.
-== Python librairies ==
+== Python libraries ==
[Note: the goal will be to package pywikibot with setuptools easy_install,
so that these dependencies will be loaded automatically when the package is
@@ -128,4 +128,16 @@
- contributions(): returns a pywikibot.Timestamp object instead of a Mediawiki one
+=== Command-line arguments ===
+
+Scripts that supported unnamed arguments as titles of pages on which to work,
+now require that those titles be written as standard pagegenerators, e.g.:
+
+ python script.py -page:"A title"
+
+while unlink.py and other scripts that required page titles as main arguments
+now need only that the titles be wrapped in quotes, as:
+
+ python unlink.py "A title"
+
# MORE TO COME #
--
To view, visit https://gerrit.wikimedia.org/r/147420
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I3d0c64bd0f4aac2a2c3cf375d84e77cb364868ad
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Ricordisamoa <ricordisamoa(a)openmailbox.org>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>