jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/481607 )
Change subject: [doc] Update documentation for deprecatedTemplates
......................................................................
[doc] Update documentation for deprecatedTemplates
Change-Id: I24ad5cb9224a6f10c48b94816c9695b6c63fbaa2
---
M pywikibot/cosmetic_changes.py
1 file changed, 4 insertions(+), 4 deletions(-)
Approvals:
Mpaa: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/cosmetic_changes.py b/pywikibot/cosmetic_changes.py
index 85ff485..56d8011 100755
--- a/pywikibot/cosmetic_changes.py
+++ b/pywikibot/cosmetic_changes.py
@@ -137,18 +137,18 @@
# Use a list with two entries. The first entry will be replaced by the second.
# Examples:
# For removing {{Foo}}, the list must be:
-# (u'Foo', None),
+# ('Foo', None),
#
# The following also works:
-# (u'Foo', ''),
+# ('Foo', ''),
#
# For replacing {{Foo}} with {{Bar}} the list must be:
-# (u'Foo', u'Bar'),
+# ('Foo', 'Bar'),
#
# This also removes all template parameters of {{Foo}}
# For replacing {{Foo}} with {{Bar}} but keep the template
# parameters in its original order, please use:
-# (u'Foo', u'Bar\g<parameters>'),
+# ('Foo', 'Bar\\g<parameters>'),
deprecatedTemplates = {
'wikipedia': {
--
To view, visit https://gerrit.wikimedia.org/r/481607
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I24ad5cb9224a6f10c48b94816c9695b6c63fbaa2
Gerrit-Change-Number: 481607
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: jenkins-bot (75)
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/481332 )
Change subject: Pywikibot: Add missing docsting params
......................................................................
Pywikibot: Add missing docsting params
Desciption for following params are added:
-In site.py param 'site' of init method of class InterwikiMap
-In site.py param 'prefix' of getitem method of class InterwikiMap
-In site.py param 'url' of get_by_url method of class InterwikiMap
-In bot_choice.py param 'options' of formatted method of class Option
-In bot_choice.py param 'shortcut' of init method of class StandardOption
-In bot_choice.py param 'text' of formatted method of class Option
Bug: T184115
Change-Id: I828025e5a2706950a1b5a3a6f0d795f0423ad499
---
M pywikibot/bot_choice.py
M pywikibot/site.py
2 files changed, 40 insertions(+), 5 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/bot_choice.py b/pywikibot/bot_choice.py
index 8555e36..ac46c8b 100755
--- a/pywikibot/bot_choice.py
+++ b/pywikibot/bot_choice.py
@@ -38,7 +38,16 @@
@staticmethod
def formatted(text, options, default=None):
- """Create a text with the options formatted into it."""
+ """
+ Create a text with the options formatted into it.
+
+ @param text: Text into which options are to be formatted
+ @type text: str
+ @param options: Option instances to be formatted
+ @type options: Iterable
+ @return: Text with the options formatted into it
+ @rtype: str
+ """
formatted_options = []
for option in options:
formatted_options.append(option.format(default=default))
@@ -102,7 +111,14 @@
"""An option with a description and shortcut and returning the shortcut."""
def __init__(self, option, shortcut, **kwargs):
- """Initializer."""
+ """
+ Initializer.
+
+ @param option: option string
+ @type option: str
+ @param shortcut: Shortcut of the option
+ @type shortcut: str
+ """
super(StandardOption, self).__init__(**kwargs)
self.option = option
self.shortcut = shortcut.lower()
diff --git a/pywikibot/site.py b/pywikibot/site.py
index ea0b4a3..4148f24 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -680,7 +680,12 @@
"""A representation of the interwiki map of a site."""
def __init__(self, site):
- """Create an empty uninitalized interwiki map for the given site."""
+ """
+ Create an empty uninitalized interwiki map for the given site.
+
+ @param site: Given site for which interwiki map is to be created
+ @type site: APISite
+ """
super(_InterwikiMap, self).__init__()
self._site = site
self._map = None
@@ -700,7 +705,15 @@
return self._map
def __getitem__(self, prefix):
- """Return the site, locality and url for the requested prefix."""
+ """
+ Return the site, locality and url for the requested prefix.
+
+ @param prefix: Interwiki prefix
+ @type prefix: Dictionary key
+ @rtype: _IWEntry
+ @raises KeyError: Prefix is not a key
+ @raises TypeError: Site for the prefix is of wrong type
+ """
if prefix not in self._iw_sites:
raise KeyError("'{0}' is not an interwiki prefix.".format(prefix))
if isinstance(self._iw_sites[prefix].site, BaseSite):
@@ -712,7 +725,13 @@
% (prefix, type(self._iw_sites[prefix].site)))
def get_by_url(self, url):
- """Return a set of prefixes applying to the URL."""
+ """
+ Return a set of prefixes applying to the URL.
+
+ @param url: URL for the interwiki
+ @type url: str
+ @rtype: set
+ """
return {prefix for prefix, iw_entry in self._iw_sites
if iw_entry.url == url}
--
To view, visit https://gerrit.wikimedia.org/r/481332
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I828025e5a2706950a1b5a3a6f0d795f0423ad499
Gerrit-Change-Number: 481332
Gerrit-PatchSet: 10
Gerrit-Owner: AdityaJ <adi2007jain(a)gmail.com>
Gerrit-Reviewer: AdityaJ <adi2007jain(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot (75)
Gerrit-CC: Rafidaslam <rafidteam(a)gmail.com>
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/481470 )
Change subject: Localisation updates from https://translatewiki.net.
......................................................................
Localisation updates from https://translatewiki.net.
Change-Id: Ib7364231ce273e71b6ec4d75481968f55a701fba
---
M category_redirect/cs.json
M category_redirect/da.json
M category_redirect/ur.json
A template/ur.json
M thirdparty/ur.json
M undelete/ur.json
A unlink/ur.json
M unprotect/ur.json
M weblinkchecker/ur.json
9 files changed, 54 insertions(+), 6 deletions(-)
Approvals:
L10n-bot: Looks good to me, approved
jenkins-bot: Verified
diff --git a/category_redirect/cs.json b/category_redirect/cs.json
index cda7662..0a5d3a0 100644
--- a/category_redirect/cs.json
+++ b/category_redirect/cs.json
@@ -2,7 +2,8 @@
"@metadata": {
"authors": [
"Spiffyk",
- "Dvorapa"
+ "Dvorapa",
+ "Patriccck"
]
},
"category_redirect-add-template": "Robot: přidání šablony přesměrování kategorie kvůli údržbě",
@@ -10,5 +11,21 @@
"category_redirect-comment": "Robot k údržbě přesměrování kategorií",
"category_redirect-edit-request": "Následující zamčené stránky potřebují úpravu odkazů na kategorie: %(itemlist)s",
"category_redirect-edit-request-item": "* %(title)s je v kategorii %(oldcat)s, která je přesměrovaná na %(newcat)s",
- "category_redirect-fix-double": "Robot: opraveno dvojité přesměrování"
+ "category_redirect-fix-double": "Robot: opraveno dvojité přesměrování",
+ "category_redirect-log-added": "* [[%(ns)s%(template)s]] zařazena do %(oldcat)s",
+ "category_redirect-log-add-failed": "* Nebylo možné zařadit [[%(ns)s%(template)s]] do %(oldcat)s",
+ "category_redirect-log-double": "* Opraveno dvojité přesměrování: %(oldcat)s -> %(newcat)s -> %(targetcat)s",
+ "category_redirect-log-failed": "** Chyba: %(error)s",
+ "category_redirect-log-false-positive": "* Falešný nález: %(oldcat)s",
+ "category_redirect-log-ignoring": "* %(oldcat)s vynechána",
+ "category_redirect-log-loop": "* Cyklus přesměrování z %(oldcat)s",
+ "category_redirect-log-moved": "* %(oldcat)s: %(found)d nalezeno, %(moved)d přesunuto",
+ "category_redirect-log-move-error": "* %(oldcat)s: chyba v move_contents",
+ "category_redirect-log-new": "Nová přesměrování od posledního reportu:",
+ "category_redirect-log-not-loaded": "* Nebylo možné načíst %(oldcat)s; vynecháno",
+ "category_redirect-log-skipping": "* %(oldcat)s přeskočena; v závěrečné fázi",
+ "category_redirect-older-logs": "'''[%(oldlogs)s Starší logy]'''",
+ "category_redirect-problem-hard": "# %(oldcat)s je natvrdo přesměrováno na %(page)s",
+ "category_redirect-problem-redirects": "# %(oldcat)s je přesměrována na %(redpage)s",
+ "category_redirect-problem-self-linked": "# %(oldcat)s přesměrovává na sebe sama"
}
diff --git a/category_redirect/da.json b/category_redirect/da.json
index be71e2f..de03798 100644
--- a/category_redirect/da.json
+++ b/category_redirect/da.json
@@ -5,7 +5,8 @@
"Kaare",
"Peter Alberti",
"Sarrus",
- "MGA73"
+ "MGA73",
+ "Saederup92"
]
},
"category_redirect-add-template": "Robot: Tilføjer kategoriomdirigeringsskabelon til vedligeholdelse",
@@ -13,5 +14,6 @@
"category_redirect-comment": "Robot til vedligeholdelse af kategoriomdirigeringer",
"category_redirect-edit-request": "Det er opdaget, at følgende beskyttede sider kræver opdatering af kategorilinks: %(itemlist)s",
"category_redirect-edit-request-item": "* %(title)s er i %(oldcat)s, som er en omdirigering til %(newcat)s",
- "category_redirect-fix-double": "Robot: Retter dobbelt omdirigering"
+ "category_redirect-fix-double": "Robot: Retter dobbelt omdirigering",
+ "category_redirect-log-ignoring": "* Ignorerer %(oldcat)s"
}
diff --git a/category_redirect/ur.json b/category_redirect/ur.json
index f12da20..97be3a4 100644
--- a/category_redirect/ur.json
+++ b/category_redirect/ur.json
@@ -4,5 +4,9 @@
"Muhammad Shuaib"
]
},
- "category_redirect-fix-double": "خودکار: درستی دوہرا رجوع مکرر"
+ "category_redirect-add-template": "خودکار: اضافہ سانچہ {{زمرہ رجوع مکرر}}",
+ "category_redirect-fix-double": "خودکار: درستی دوہرا رجوع مکرر",
+ "category_redirect-log-added": "* %(oldcat)s میں [[%(ns)s%(template)s]] کا اضافہ",
+ "category_redirect-log-add-failed": "* %(oldcat)s میں [[%(ns)s%(template)s]] کا اضافہ نہیں ہوا",
+ "category_redirect-log-not-loaded": "* %(oldcat)s لوڈ نہیں ہو سکی اس لیے اسے نظر انداز کیا جا رہا ہے"
}
diff --git a/template/ur.json b/template/ur.json
new file mode 100644
index 0000000..3ab4646
--- /dev/null
+++ b/template/ur.json
@@ -0,0 +1,9 @@
+{
+ "@metadata": {
+ "authors": [
+ "Muhammad Shuaib"
+ ]
+ },
+ "template-changing": "خودکار: تبدیلی {{PLURAL:%(num)d|سانچہ|سانچہ جات}}: %(list)s",
+ "template-removing": "خودکار: حذف {{PLURAL:%(num)d|سانچہ|سانچہ جات}}: %(list)s"
+}
diff --git a/thirdparty/ur.json b/thirdparty/ur.json
index 6bdb7af..c320d9c 100644
--- a/thirdparty/ur.json
+++ b/thirdparty/ur.json
@@ -10,5 +10,6 @@
"thirdparty-drtrigonbot-sum_disc-notify-new": "نئی گفتگو",
"thirdparty-drtrigonbot-sum_disc-notify-notify": "اطلاع نامہ",
"thirdparty-drtrigonbot-sum_disc-parse-nonhuman": "(انسانی روپ میں کوئی ترمیم کنندہ نہیں ملا)",
+ "thirdparty-drtrigonbot-sum_disc-parse-start": "؛ %d. %B %Y",
"thirdparty-drtrigonbot-sum_disc-summary-head": "روبہ"
}
diff --git a/undelete/ur.json b/undelete/ur.json
index 2aad3f8..5d5ccef 100644
--- a/undelete/ur.json
+++ b/undelete/ur.json
@@ -4,5 +4,7 @@
"Muhammad Shuaib"
]
},
- "undelete-from-file": "خودکار: متعدد صفحات کو بحال کیا جا رہا ہے"
+ "undelete-from-file": "خودکار: متعدد صفحات کو بحال کیا جا رہا ہے",
+ "undelete-images": "خودکار: صفحہ %(page)s کی تمام تصویروں کو بحال کیا جا رہا ہے",
+ "undelete-linked-pages": "خودکار: %(page)s سے مربوط تمام صفحات کو بحال کیا جا رہا ہے"
}
diff --git a/unlink/ur.json b/unlink/ur.json
new file mode 100644
index 0000000..af3e3a3
--- /dev/null
+++ b/unlink/ur.json
@@ -0,0 +1,8 @@
+{
+ "@metadata": {
+ "authors": [
+ "Muhammad Shuaib"
+ ]
+ },
+ "unlink-unlinking": "خودکار: \"%(title)s\" کو غیر مربوط کیا جا رہا ہے"
+}
diff --git a/unprotect/ur.json b/unprotect/ur.json
index 4494aeb..819165a 100644
--- a/unprotect/ur.json
+++ b/unprotect/ur.json
@@ -4,5 +4,9 @@
"Muhammad Shuaib"
]
},
+ "unprotect-category": "خودکار: زمرہ %(cat)s کے تمام صفحات غیر محفوظ کیے جا رہے ہیں",
+ "unprotect-images": "خودکار: صفحہ %(page)s کی تمام تصویروں کو غیر محفوظ کیا جا رہا ہے",
+ "unprotect-links": "خودکار: %(page)s سے مربوط تمام صفحات کو غیر محفوظ کیا جا رہا ہے",
+ "unprotect-ref": "خودکار: %(page)s سے متعلق تمام صفحات کو غیر محفوظ کیا جا رہا ہے",
"unprotect-simple": "خودکار: متعدد فائلوں کو محفوظ کیا جا رہا ہے"
}
diff --git a/weblinkchecker/ur.json b/weblinkchecker/ur.json
index acb0fa8..f96d7d2 100644
--- a/weblinkchecker/ur.json
+++ b/weblinkchecker/ur.json
@@ -7,5 +7,6 @@
"weblinkchecker-archive_msg": "انٹرنیٹ آرکائیو میں اس ویب صفحے کو محفوظ کر دیا گیا ہے۔ براہ کرم مناسب وثق شدہ نسخے سے مربوط کریں: [%(URL)s]۔",
"weblinkchecker-badurl": "فراہم کردہ ربط درست نہیں معلوم ہوتا",
"weblinkchecker-caption": "مردہ ربط",
+ "weblinkchecker-report": "بوٹ کی متعدد خودکار پڑتال کے دوران میں حسب ذیل بیرونی ربط ناقابل رسائی معلوم ہوا۔ براہ کرم اسے جانچ لیں، اگر یہ ربط واقعی دستیاب نہیں تو اسے ہٹا دیں ورنہ اسے درست کریں۔",
"weblinkchecker-summary": "خودکار: غیر موجود بیرونی ربط کی اطلاع"
}
--
To view, visit https://gerrit.wikimedia.org/r/481470
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/i18n
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib7364231ce273e71b6ec4d75481968f55a701fba
Gerrit-Change-Number: 481470
Gerrit-PatchSet: 1
Gerrit-Owner: L10n-bot <l10n-bot(a)translatewiki.net>
Gerrit-Reviewer: L10n-bot <l10n-bot(a)translatewiki.net>
Gerrit-Reviewer: jenkins-bot (75)
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/481321 )
Change subject: tools: Support LZMA and XZ formats
......................................................................
tools: Support LZMA and XZ formats
The module to support these formats, lzma, was added Python 3.3 [1].
The format has been proven to do better compression ratios at the cost
of longer compression times.
[1] https://bugs.python.org/issue6715
Change-Id: I821a48beb755d284576df8c6c9a8f6e8595cb086
---
M pywikibot/tools/__init__.py
A tests/data/xml/article-pyrus.xml.lzma
A tests/data/xml/article-pyrus.xml.xz
M tests/tools_tests.py
4 files changed, 84 insertions(+), 13 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py
index 76e0f7a..6888440 100644
--- a/pywikibot/tools/__init__.py
+++ b/pywikibot/tools/__init__.py
@@ -56,6 +56,11 @@
warn('package bz2 and bz2file were not found', ImportWarning)
bz2 = bz2_import_error
+try:
+ import lzma
+except ImportError as lzma_import_error:
+ lzma = lzma_import_error
+
if PYTHON_VERSION < (3, 5):
# although deprecated in 3 completely no message was emitted until 3.5
@@ -1249,10 +1254,11 @@
"""
Open a file and uncompress it if needed.
- This function supports bzip2, gzip and 7zip as compression containers. It
- uses the packages available in the standard library for bzip2 and gzip so
- they are always available. 7zip is only available when a 7za program is
- available and only supports reading from it.
+ This function supports bzip2, gzip, 7zip, lzma, and xz as compression
+ containers. It uses the packages available in the standard library for
+ bzip2, gzip, lzma, and xz so they are always available. 7zip is only
+ available when a 7za program is available and only supports reading
+ from it.
The compression is either selected via the magic number or file ending.
@@ -1274,6 +1280,11 @@
@raises OSError: When it's not a 7z archive but the file extension is 7z.
It is also raised by bz2 when its content is invalid. gzip does not
immediately raise that error but only on reading it.
+ @raises lzma.LZMAError: When error occurs during compression or
+ decompression or when initializing the state with lzma or xz.
+ @raises ImportError: When file is compressed with bz2 but neither bz2 nor
+ bz2file is importable, or when file is compressed with lzma or xz but
+ lzma is not importable.
@return: A file-like object returning the uncompressed data in binary mode.
@rtype: file-like object
"""
@@ -1297,6 +1308,9 @@
extension = 'gz'
elif magic_number.startswith(b"7z\xBC\xAF'\x1C"):
extension = '7z'
+ # Unfortunately, legacy LZMA container format has no magic number
+ elif magic_number.startswith(b'\xFD7zXZ\x00'):
+ extension = 'xz'
else:
extension = ''
@@ -1304,9 +1318,9 @@
if isinstance(bz2, ImportError):
raise bz2
return bz2.BZ2File(filename, mode)
- elif extension == 'gz':
+ if extension == 'gz':
return gzip.open(filename, mode)
- elif extension == '7z':
+ if extension == '7z':
if mode != 'rb':
raise NotImplementedError('It is not possible to write a 7z file.')
@@ -1327,9 +1341,16 @@
'Unexpected STDERR output from 7za {0}'.format(stderr))
else:
return process.stdout
- else:
- # assume it's an uncompressed file
- return open(filename, 'rb')
+ if extension == 'lzma':
+ if isinstance(lzma, ImportError):
+ raise lzma
+ return lzma.open(filename, mode, format=lzma.FORMAT_ALONE)
+ if extension == 'xz':
+ if isinstance(lzma, ImportError):
+ raise lzma
+ return lzma.open(filename, mode, format=lzma.FORMAT_XZ)
+ # assume it's an uncompressed file
+ return open(filename, 'rb')
def merge_unique_dicts(*args, **kwargs):
diff --git a/tests/data/xml/article-pyrus.xml.lzma b/tests/data/xml/article-pyrus.xml.lzma
new file mode 100644
index 0000000..816634d
--- /dev/null
+++ b/tests/data/xml/article-pyrus.xml.lzma
Binary files differ
diff --git a/tests/data/xml/article-pyrus.xml.xz b/tests/data/xml/article-pyrus.xml.xz
new file mode 100644
index 0000000..1d3b79e
--- /dev/null
+++ b/tests/data/xml/article-pyrus.xml.xz
Binary files differ
diff --git a/tests/tools_tests.py b/tests/tools_tests.py
index 20ff4f1..ce8722b 100644
--- a/tests/tools_tests.py
+++ b/tests/tools_tests.py
@@ -138,7 +138,7 @@
"""Test open_archive when bz2 and bz2file are not available."""
old_bz2 = tools.bz2
bz2_import_error = ('This is a fake exception message that is '
- 'used when bz2 and bz2file is not importable')
+ 'used when bz2 and bz2file are not importable')
try:
tools.bz2 = ImportError(bz2_import_error)
self.assertRaisesRegex(ImportError,
@@ -167,6 +167,38 @@
self.base_file + '_invalid.7z',
use_extension=True)
+ def test_open_archive_lzma(self):
+ """Test open_archive with lzma compressor in the standard library."""
+ if isinstance(tools.lzma, ImportError):
+ raise unittest.SkipTest('lzma not importable')
+ self.assertEqual(
+ self._get_content(self.base_file + '.lzma'), self.original_content)
+ # Legacy LZMA container formet has no magic, skipping
+ # use_extension=False test here
+ self.assertEqual(
+ self._get_content(self.base_file + '.xz'), self.original_content)
+ self.assertEqual(
+ self._get_content(self.base_file + '.xz', use_extension=False),
+ self.original_content)
+
+ def test_open_archive_without_lzma(self):
+ """Test open_archive when lzma is not available."""
+ old_lzma = tools.lzma
+ lzma_import_error = ('This is a fake exception message that is '
+ 'used when lzma is not importable')
+ try:
+ tools.lzma = ImportError(lzma_import_error)
+ self.assertRaisesRegex(ImportError,
+ lzma_import_error,
+ self._get_content,
+ self.base_file + '.lzma')
+ self.assertRaisesRegex(ImportError,
+ lzma_import_error,
+ self._get_content,
+ self.base_file + '.xz')
+ finally:
+ tools.lzma = old_lzma
+
class OpenCompressedTestCase(OpenArchiveTestCase, DeprecationTestCase):
@@ -176,9 +208,10 @@
def _get_content(self, *args, **kwargs):
"""Use open_compressed and return content using a with-statement."""
- # open_archive default is True, so if it's False it's not the default
- # so use the non-default of open_compressed (which is True)
- if kwargs.get('use_extension') is False:
+ # open_archive default is True, but open_compressed default is False.
+ # The test cases assumes a default of True and we need to make
+ # open_compressed acknowledge that.
+ if 'use_extension' not in kwargs:
kwargs['use_extension'] = True
with tools.open_compressed(*args, **kwargs) as f:
@@ -259,6 +292,23 @@
'/dev/null.7z',
mode='wb')
+ def test_write_archive_lzma(self):
+ """Test writing a lzma archive."""
+ if isinstance(tools.lzma, ImportError):
+ raise unittest.SkipTest('lzma not importable')
+
+ content = self._write_content('.lzma')
+ with open(self.base_file + '.lzma', 'rb') as f:
+ self.assertEqual(content, f.read())
+
+ def test_write_archive_xz(self):
+ """Test writing a xz archive."""
+ if isinstance(tools.lzma, ImportError):
+ raise unittest.SkipTest('lzma not importable')
+
+ content = self._write_content('.xz')
+ self.assertEqual(content[:6], b'\xFD7zXZ\x00')
+
class MergeUniqueDicts(TestCase):
--
To view, visit https://gerrit.wikimedia.org/r/481321
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I821a48beb755d284576df8c6c9a8f6e8595cb086
Gerrit-Change-Number: 481321
Gerrit-PatchSet: 4
Gerrit-Owner: Zhuyifei1999 <zhuyifei1999(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: Zhuyifei1999 <zhuyifei1999(a)gmail.com>
Gerrit-Reviewer: jenkins-bot (75)
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/481322 )
Change subject: Basestring is a description of parameter value's type
......................................................................
Basestring is a description of parameter value's type
Change-Id: I8477eedbf9674341805e3e76f0d6f99ed74b270e
---
M pywikibot/page.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/page.py b/pywikibot/page.py
index f5f053f..92118bd 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -636,7 +636,7 @@
Update the current (edited) wikitext.
@param value: New value or None
- @param value: basestring
+ @type value: basestring
"""
self._text = None if value is None else unicode(value)
if hasattr(self, '_raw_extracted_templates'):
--
To view, visit https://gerrit.wikimedia.org/r/481322
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I8477eedbf9674341805e3e76f0d6f99ed74b270e
Gerrit-Change-Number: 481322
Gerrit-PatchSet: 1
Gerrit-Owner: AdityaJ <adi2007jain(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot (75)