Dalba has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/405750 )
Change subject: pywikibot.version.getversion: Display UNKNOWN status when there is no hash
......................................................................
pywikibot.version.getversion: Display UNKNOWN status when there is no hash
When the hash value is not found, it defaults to an empty string which should
be differentiated from a valid hash value.
This patch does not fully resolve T184692, it merely displays a more
appropriate status.
Bug: T184692
Change-Id: Icb0ef92dbc9e883c65510759dd0129fcf1b68b8d
---
M pywikibot/version.py
1 file changed, 2 insertions(+), 1 deletion(-)
Approvals:
jenkins-bot: Verified
Xqt: Looks good to me, approved
diff --git a/pywikibot/version.py b/pywikibot/version.py
index b76f2a6..956a2f0 100644
--- a/pywikibot/version.py
+++ b/pywikibot/version.py
@@ -78,7 +78,8 @@
try:
hsh2 = getversion_onlinerepo()
hsh1 = data['hsh']
- data['cmp_ver'] = 'OUTDATED' if hsh1 != hsh2 else 'ok'
+ data['cmp_ver'] = 'UNKNOWN' if not hsh1 else (
+ 'OUTDATED' if hsh1 != hsh2 else 'ok')
except Exception:
pass
--
To view, visit https://gerrit.wikimedia.org/r/405750
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Icb0ef92dbc9e883c65510759dd0129fcf1b68b8d
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: Zoranzoki21 <zorandori4444(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/405581 )
Change subject: [cleanup] always use ¶ms; for pagegenerators options inclusion
......................................................................
[cleanup] always use ¶ms; for pagegenerators options inclusion
All scripts use ¶ms; token or include pagegenerators options
except interwiki.py. Use the same token for all scripts.
Change-Id: I6f3437c7ae31f79d8ec06c8e427dd9aafabc0686
---
M docs/conf.py
M scripts/interwiki.py
2 files changed, 6 insertions(+), 6 deletions(-)
Approvals:
Framawiki: Looks good to me, approved
jenkins-bot: Verified
diff --git a/docs/conf.py b/docs/conf.py
index 83c04f8..60cfe23 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
"""Configuration file for Sphinx."""
#
-# (C) Pywikibot team, 2015-2017
+# (C) Pywikibot team, 2015-2018
#
# Distributed under the terms of the MIT license.
#
@@ -260,7 +260,7 @@
if os.path.sep + "scripts" + os.path.sep not in obj.__file__:
return
for index, line in enumerate(lines):
- if line in ('¶ms;', '&pagegenerators_help;'):
+ if line == '¶ms;':
lines[index] = ('This script supports use of '
':py:mod:`pywikibot.pagegenerators` arguments.')
elif line == '&fixes-help;':
diff --git a/scripts/interwiki.py b/scripts/interwiki.py
index b1bca2f..33b67e2 100755
--- a/scripts/interwiki.py
+++ b/scripts/interwiki.py
@@ -12,7 +12,7 @@
These command-line arguments can be used to specify which pages to work on:
-&pagegenerators_help;
+¶ms;
-days: Like -years, but runs through all date pages. Stops at
Dec 31. If the argument is given in the form -days:X,
@@ -337,8 +337,8 @@
# (C) Rob W.W. Hooft, 2003
# (C) Daniel Herding, 2004
# (C) Yuri Astrakhan, 2005-2006
-# (C) xqt, 2009-2017
-# (C) Pywikibot team, 2007-2017
+# (C) xqt, 2009-2018
+# (C) Pywikibot team, 2007-2018
#
# Distributed under the terms of the MIT license.
#
@@ -366,7 +366,7 @@
unicode = str
docuReplacements = {
- '&pagegenerators_help;': pagegenerators.parameterHelp
+ '¶ms;': pagegenerators.parameterHelp
}
--
To view, visit https://gerrit.wikimedia.org/r/405581
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6f3437c7ae31f79d8ec06c8e427dd9aafabc0686
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: Framawiki <framawiki(a)tools.wmflabs.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: Zoranzoki21 <zorandori4444(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/405720 )
Change subject: pywikibot.version.getversion_package: Return empty string as hash value
......................................................................
pywikibot.version.getversion_package: Return empty string as hash value
Since we have removed __version__ variables, get_module_version(pywikibot)
will always return None. The None value causes failure later when data['hsh']
is sliced on line 85.
Also since Python 3.4 __file__ is always absolute.[1] This was causing a
discrepancy between the results of python2 and python3.
[1]: https://docs.python.org/3.4/whatsnew/3.4.html#other-language-changes
Bug: T185491
Change-Id: I4dacaf7c687b29f64cfb9a1db855a452c1a58416
---
M pywikibot/version.py
1 file changed, 4 insertions(+), 2 deletions(-)
Approvals:
jenkins-bot: Verified
Xqt: Looks good to me, approved
diff --git a/pywikibot/version.py b/pywikibot/version.py
index 3eecc93..b76f2a6 100644
--- a/pywikibot/version.py
+++ b/pywikibot/version.py
@@ -35,7 +35,7 @@
import pywikibot
from pywikibot import config2 as config
-from pywikibot.tools import deprecated, PY2
+from pywikibot.tools import deprecated, PY2, PYTHON_VERSION
if not PY2:
basestring = (str, )
@@ -366,7 +366,7 @@
- hash (git hash for the current revision of 'pywikibot/__init__.py')
@rtype: C{tuple} of four C{str}
"""
- hsh = get_module_version(pywikibot)
+ hsh = ''
date = get_module_mtime(pywikibot).timetuple()
tag = 'pywikibot/__init__.py'
@@ -453,6 +453,8 @@
"""
if hasattr(module, '__file__') and os.path.exists(module.__file__):
filename = module.__file__
+ if PYTHON_VERSION < (3, 4):
+ filename = os.path.abspath(filename)
if filename[-4:-1] == '.py' and os.path.exists(filename[:-1]):
filename = filename[:-1]
program_dir = _get_program_dir()
--
To view, visit https://gerrit.wikimedia.org/r/405720
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I4dacaf7c687b29f64cfb9a1db855a452c1a58416
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: Zoranzoki21 <zorandori4444(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/405580 )
Change subject: [doc] No reason to restrict sphinx to very outdated release
......................................................................
[doc] No reason to restrict sphinx to very outdated release
Change-Id: Iae68e33e98c44e112a3a234d8237dd5f8fe5dd6e
---
M docs/requirements-py3.txt
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Dalba: Looks good to me, approved
jenkins-bot: Verified
diff --git a/docs/requirements-py3.txt b/docs/requirements-py3.txt
index 7403a65..6ff7fe5 100644
--- a/docs/requirements-py3.txt
+++ b/docs/requirements-py3.txt
@@ -1,8 +1,8 @@
# This is a PIP requirements file for building Sphinx documentation of pywikibot
-# using sphinx-1.3b1 on python3.4, and is used by readthedocs.org.
+# using sphinx on python3.4.
# requests-requirements.txt is also needed
-sphinx==1.3.1
+sphinx
sphinx-epytext>=0.0.4
numpydoc
--
To view, visit https://gerrit.wikimedia.org/r/405580
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iae68e33e98c44e112a3a234d8237dd5f8fe5dd6e
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Zoranzoki21 <zorandori4444(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>