jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/465115 )
Change subject: [bugfix] Show what page by which user is going to be patrolled
......................................................................
[bugfix] Show what page by which user is going to be patrolled
- partially reverts cad9b0b00dc1
Bug: T206428
Change-Id: I7378ad0c572c5d2cb3151b392e915a887bcd70a5
---
M scripts/patrol.py
1 file changed, 3 insertions(+), 3 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/patrol.py b/scripts/patrol.py
index 8d97ace..e72e7ad 100755
--- a/scripts/patrol.py
+++ b/scripts/patrol.py
@@ -310,9 +310,9 @@
self.load_whitelist()
self.repeat_start_ts = time.time()
- if self.getOption('ask'):
- verbose_output('User {0} has created or modified page {1}'
- .format(username, title))
+ if pywikibot.config.verbose_output or self.getOption('ask'):
+ pywikibot.output('User {0} has created or modified page {1}'
+ .format(username, title))
if self.getOption('autopatroluserns') and (page['ns'] == 2 or
page['ns'] == 3):
--
To view, visit https://gerrit.wikimedia.org/r/465115
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: I7378ad0c572c5d2cb3151b392e915a887bcd70a5
Gerrit-Change-Number: 465115
Gerrit-PatchSet: 2
Gerrit-Owner: Dvorapa <dvorapa(a)seznam.cz>
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: 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/465021 )
Change subject: http.py: Make sure the cookie file is created with the right permissions
......................................................................
http.py: Make sure the cookie file is created with the right permissions
pywikibot.tools:
- Add `create` as new argument for file_mode_checker. It'll create an
empty file with appropriate permissions if True.
pywikibot.comms.http:
- There is no need to check and fix file permissions on every load and
save. Do it only once before creating the cookie_jar object.
Use the new capability of file_mode_checker to do so.
- Deprecate PywikibotCookieJar class.
- Now that we are directly using LWPCookieJar, `cookie_jar.load()` won't
raise IOError anymore (IOError used to be raised by file_mode_checker).
Remove IOError from the except clause of `cookie_jar.load()`.
Bug: T206387
Change-Id: I769c85be9523bfcc9912954b6afc8bdfb7e09f22
---
M pywikibot/comms/http.py
M pywikibot/tools/__init__.py
2 files changed, 24 insertions(+), 6 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/comms/http.py b/pywikibot/comms/http.py
index a497ac6..893942e 100644
--- a/pywikibot/comms/http.py
+++ b/pywikibot/comms/http.py
@@ -68,6 +68,7 @@
_logger = 'comm.http'
+# Should be marked as deprecated after PywikibotCookieJar is removed.
def mode_check_decorator(func):
"""Decorate load()/save() CookieJar methods."""
def wrapper(cls, **kwargs):
@@ -84,7 +85,12 @@
# in PY2 cookielib.LWPCookieJar is not a new-style class.
class PywikibotCookieJar(cookielib.LWPCookieJar, object):
- """CookieJar which checks file permissions."""
+ """DEPRECATED. CookieJar which checks file permissions."""
+
+ @deprecated(since='20181007')
+ def __init__(self, *args, **kwargs):
+ """Initialize the class."""
+ super(PywikibotCookieJar, self).__init__(*args, **kwargs)
@mode_check_decorator
def load(self, **kwargs):
@@ -97,10 +103,12 @@
super(PywikibotCookieJar, self).save()
-cookie_jar = PywikibotCookieJar(config.datafilepath('pywikibot.lwp'))
+cookie_file_path = config.datafilepath('pywikibot.lwp')
+file_mode_checker(cookie_file_path, create=True)
+cookie_jar = cookielib.LWPCookieJar(cookie_file_path)
try:
cookie_jar.load()
-except (IOError, cookielib.LoadError):
+except cookielib.LoadError:
debug('Loading cookies failed.', _logger)
else:
debug('Loaded cookies from file.', _logger)
diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py
index af948fc..73a0baf 100644
--- a/pywikibot/tools/__init__.py
+++ b/pywikibot/tools/__init__.py
@@ -1997,17 +1997,27 @@
return open_archive(filename, use_extension=use_extension)
-def file_mode_checker(filename, mode=0o600, quiet=False):
+def file_mode_checker(filename, mode=0o600, quiet=False, create=False):
"""Check file mode and update it, if needed.
@param filename: filename path
@type filename: basestring
@param mode: requested file mode
@type mode: int
-
+ @param quiet: warn about file mode change if False.
+ @type quiet: bool
+ @param create: create the file if it does not exist already
+ @type create: bool
+ @raise IOError: The file does not exist and `create` is False.
"""
+ try:
+ st_mode = os.stat(filename).st_mode
+ except OSError: # file does not exist
+ if not create:
+ raise
+ os.close(os.open(filename, os.O_CREAT | os.O_EXCL, mode))
+ return
warn_str = 'File {0} had {1:o} mode; converted to {2:o} mode.'
- st_mode = os.stat(filename).st_mode
if stat.S_ISREG(st_mode) and (st_mode - stat.S_IFREG != mode):
os.chmod(filename, mode)
# re-read and check changes
--
To view, visit https://gerrit.wikimedia.org/r/465021
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: I769c85be9523bfcc9912954b6afc8bdfb7e09f22
Gerrit-Change-Number: 465021
Gerrit-PatchSet: 3
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: jenkins-bot (75)
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/464761 )
Change subject: Fix message about help which parameters should be used for creating family file
......................................................................
Fix message about help which parameters should be used for creating family file
Let's show where will be file placed.
Change-Id: Ic81974654ca16b3fe9f977fb42f3640ca7e3e833
---
M generate_family_file.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/generate_family_file.py b/generate_family_file.py
index 63eba9e..ab575bf 100755
--- a/generate_family_file.py
+++ b/generate_family_file.py
@@ -219,7 +219,7 @@
print("""
Usage: {module} <url> <short name>
Example: {module} https://www.mywiki.bogus/wiki/Main_Page mywiki
-This will create the file families{sep}mywiki_family.py"""
+This will create the file mywiki_family.py in pywikibot{sep}families"""
.format(module=sys.argv[0].strip('.' + os.sep),
sep=os.sep))
--
To view, visit https://gerrit.wikimedia.org/r/464761
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: Ic81974654ca16b3fe9f977fb42f3640ca7e3e833
Gerrit-Change-Number: 464761
Gerrit-PatchSet: 8
Gerrit-Owner: Zoranzoki21 <zorandori4444(a)gmail.com>
Gerrit-Reviewer: Dvorapa <dvorapa(a)seznam.cz>
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 (75)
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/464943 )
Change subject: Change default file mode for private files to 600
......................................................................
Change default file mode for private files to 600
Previous mode was 700, which caused the user-password.py to be
"executable" in theory. As it have no shebang, kernel won't know
how to execute that script.
Bug: T206385
Change-Id: If8a940ea6588abbb08cf8fefd0a646db80081efb
---
M pywikibot/config2.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Dvorapa: Looks good to me, but someone else must approve
Framawiki: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/config2.py b/pywikibot/config2.py
index 2301de9..0dafa88 100644
--- a/pywikibot/config2.py
+++ b/pywikibot/config2.py
@@ -269,7 +269,7 @@
# stat.S_IROTH 0o004 read permission for others
# stat.S_IWOTH 0o002 write permission for others
# stat.S_IXOTH 0o001 execute permission for others
-private_files_permission = stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR
+private_files_permission = stat.S_IRUSR | stat.S_IWUSR
# Allow user to stop warnings about file security
# by setting this to true.
--
To view, visit https://gerrit.wikimedia.org/r/464943
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: If8a940ea6588abbb08cf8fefd0a646db80081efb
Gerrit-Change-Number: 464943
Gerrit-PatchSet: 1
Gerrit-Owner: Urbanecm <martin.urbanec(a)wikimedia.cz>
Gerrit-Reviewer: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: Framawiki <framawiki(a)tools.wmflabs.org>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: jenkins-bot (75)
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/464777 )
Change subject: tox.ini: Use the default max_line_length
......................................................................
tox.ini: Use the default max_line_length
Fix the remaining E501 (line too long) errors.
ui_tests.py:
replace "easy_install --upgrade \
https://pywinauto.googlecode.com/files/pywinauto-0.4.2.zipeasy_install \
--upgrade https://pywinauto.googlecode.com/files/pywinauto-0.4.2.zip"
comment with "pip install -U pywinauto". It's not clear why the a
specific version was recommended. setup.py uses the latest version.
setup.py:
Remove the "FIXME: tests/ui_tests.py suggests pywinauto 0.4.2" comment.
Change-Id: I788b09ac54779ec46c6fad17911ed634c20b4d4a
---
M docs/conf.py
M pwb.py
M setup.py
M tests/page_tests.py
M tests/tools_chars_tests.py
M tests/tools_tests.py
M tests/ui_tests.py
M tests/utils.py
M tests/wikibase_edit_tests.py
M tests/wikibase_tests.py
M tests/xmlreader_tests.py
M tox.ini
12 files changed, 53 insertions(+), 35 deletions(-)
Approvals:
Dvorapa: Looks good to me, but someone else must approve
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/docs/conf.py b/docs/conf.py
index 079af53..14f7986 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -8,7 +8,7 @@
# Pywikibot documentation build configuration file, created by
# sphinx-quickstart on Wed Nov 5 15:50:05 2014.
#
-# This file is execfile()d with the current directory set to its containing dir.
+# This file is execfile()d with the current dir set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
diff --git a/pwb.py b/pwb.py
index c77ebdb..26d6d66 100755
--- a/pwb.py
+++ b/pwb.py
@@ -185,8 +185,8 @@
run_python_file(os.path.join(_pwb_dir, 'generate_user_files.py'),
['generate_user_files.py'],
['generate_user_files.py'])
- # because we have loaded pywikibot without user-config.py loaded, we need to re-start
- # the entire process. Ask the user to do so.
+ # because we have loaded pywikibot without user-config.py loaded,
+ # we need to re-start the entire process. Ask the user to do so.
print('Now, you have to re-execute the command to start your script.')
sys.exit(1)
diff --git a/setup.py b/setup.py
index 6de8817..9800e7e 100644
--- a/setup.py
+++ b/setup.py
@@ -105,7 +105,8 @@
# The main pywinauto repository doesnt support Python 3.
# The repositories used below have a Python 3 compliant setup.py
dependency_links = [
- 'git+https://github.com/AlereDevices/lunatic-python.git#egg=lunatic-python',
+ 'git+https://github.com/AlereDevices/lunatic-python.git#egg='
+ 'lunatic-python',
'hg+https://bitbucket.org/TJG/pywin32#egg=pywin32',
'git+https://github.com/vasily-v-ryabov/pywinauto-64#egg=pywinauto',
]
@@ -163,7 +164,6 @@
# Microsoft makes available a compiler for Python 2.7
# http://www.microsoft.com/en-au/download/details.aspx?id=44266
if os.name == 'nt' and os.environ.get('PYSETUP_TEST_NO_UI', '0') != '1':
- # FIXME: tests/ui_tests.py suggests pywinauto 0.4.2
# which isnt provided on pypi.
test_deps += ['pywin32', 'pywinauto>=0.4.0']
diff --git a/tests/page_tests.py b/tests/page_tests.py
index acb37d7..4cc8062 100644
--- a/tests/page_tests.py
+++ b/tests/page_tests.py
@@ -476,7 +476,8 @@
"""Test the integration with Extension:Disambiguator."""
site = self.get_site()
if not site.has_extension('Disambiguator'):
- raise unittest.SkipTest('Disambiguator extension not loaded on test site')
+ raise unittest.SkipTest(
+ 'Disambiguator extension not loaded on test site')
pg = pywikibot.Page(site, 'Random')
pg._pageprops = {'disambiguation', ''}
self.assertTrue(pg.isDisambig())
diff --git a/tests/tools_chars_tests.py b/tests/tools_chars_tests.py
index 72ee4f9..cab060c 100644
--- a/tests/tools_chars_tests.py
+++ b/tests/tools_chars_tests.py
@@ -24,8 +24,10 @@
def test_replace(self):
"""Test replace_invisible."""
- self.assertEqual(chars.replace_invisible('Hello world!'), 'Hello world!')
- self.assertEqual(chars.replace_invisible('\u200eRTL\u200f'), '<200e>RTL<200f>')
+ self.assertEqual(
+ chars.replace_invisible('Hello world!'), 'Hello world!')
+ self.assertEqual(
+ chars.replace_invisible('\u200eRTL\u200f'), '<200e>RTL<200f>')
def test_contains(self):
"""Test contains_invisible."""
diff --git a/tests/tools_tests.py b/tests/tools_tests.py
index 58c7ae3..20ff4f1 100644
--- a/tests/tools_tests.py
+++ b/tests/tools_tests.py
@@ -73,8 +73,9 @@
'pywikibot.tools.ContextManagerWrapper is deprecated.'):
wrapper = tools.ContextManagerWrapper(self.DummyClass())
self.assertFalse(wrapper.closed)
- with self.assertRaisesRegex(ZeroDivisionError,
- '(integer division or modulo by zero|division by zero)'):
+ with self.assertRaisesRegex(
+ ZeroDivisionError,
+ '(integer division or modulo by zero|division by zero)'):
with wrapper:
1 / 0
self.assertTrue(wrapper.closed)
@@ -108,13 +109,16 @@
def test_open_archive_normal(self):
"""Test open_archive with no compression in the standard library."""
- self.assertEqual(self._get_content(self.base_file), self.original_content)
+ self.assertEqual(
+ self._get_content(self.base_file), self.original_content)
def test_open_archive_bz2(self):
"""Test open_archive with bz2 compressor in the standard library."""
- self.assertEqual(self._get_content(self.base_file + '.bz2'), self.original_content)
- self.assertEqual(self._get_content(self.base_file + '.bz2', use_extension=False),
- self.original_content)
+ self.assertEqual(
+ self._get_content(self.base_file + '.bz2'), self.original_content)
+ self.assertEqual(
+ self._get_content(self.base_file + '.bz2', use_extension=False),
+ self.original_content)
@require_modules('bz2file')
def test_open_archive_with_bz2file(self):
@@ -146,7 +150,8 @@
def test_open_archive_gz(self):
"""Test open_archive with gz compressor in the standard library."""
- self.assertEqual(self._get_content(self.base_file + '.gz'), self.original_content)
+ self.assertEqual(
+ self._get_content(self.base_file + '.gz'), self.original_content)
def test_open_archive_7z(self):
"""Test open_archive with 7za if installed."""
@@ -154,7 +159,8 @@
subprocess.Popen(['7za'], stdout=subprocess.PIPE).stdout.close()
except OSError:
raise unittest.SkipTest('7za not installed')
- self.assertEqual(self._get_content(self.base_file + '.7z'), self.original_content)
+ self.assertEqual(
+ self._get_content(self.base_file + '.7z'), self.original_content)
self.assertRaisesRegex(OSError,
'Unexpected STDERR output from 7za ',
self._get_content,
@@ -225,7 +231,8 @@
self.assertRaisesRegex(ValueError,
'Magic number detection only when reading',
tools.open_archive,
- '/dev/null', 'wb', False) # writing without extension
+ # writing without extension
+ '/dev/null', 'wb', False)
def test_binary_mode(self):
"""Test that it uses binary mode."""
@@ -283,7 +290,8 @@
def test_conflict(self):
"""Test that it detects conflicts."""
self.assertRaisesRegex(
- ValueError, '42', tools.merge_unique_dicts, self.dct1, **{'42': 'bad'})
+ ValueError, '42', tools.merge_unique_dicts, self.dct1,
+ **{'42': 'bad'})
self.assertRaisesRegex(
ValueError, '42', tools.merge_unique_dicts, self.dct1, self.dct1)
self.assertRaisesRegex(
@@ -329,7 +337,8 @@
"""Test marker is shown with start and stop with kwargs."""
start = 1
stop = 3
- it = list(tools.islice_with_ellipsis(self.it, start, stop, marker='new'))
+ it = list(tools.islice_with_ellipsis(
+ self.it, start, stop, marker='new'))
self.assertEqual(len(it), stop - start + 1) # +1 to consider marker.
self.assertEqual(it[:-1], self.it[start:stop])
self.assertNotEqual(it[-1], '…')
@@ -551,7 +560,7 @@
for _ in self.decs:
self.assertEqual(id(next(deduper)), deduped.pop())
self.assertRaises(StopIteration, next, deduper)
- # No. of Decimal with distinct ids != no. of Decimal with distinct value.
+ # len(Decimal with distinct ids) != len(Decimal with distinct value).
deduper_ids = list(tools.filter_unique(self.decs, key=id))
self.assertNotEqual(len(deduper_ids), len(set(deduper_ids)))
diff --git a/tests/ui_tests.py b/tests/ui_tests.py
index 7fc1934..09d1cc0 100644
--- a/tests/ui_tests.py
+++ b/tests/ui_tests.py
@@ -9,11 +9,11 @@
#
# Windows UI tests have to be run using the tests\ui_tests.bat helper script.
# This will set PYTHONPATH and PYWIKIBOT_DIR, and then run the tests. Do not
-# touch mouse or keyboard while the tests are running, as this might disturb the
-# interaction tests.
+# touch mouse or keyboard while the tests are running, as this might disturb
+# the interaction tests.
#
-# The Windows tests were developed on a Dutch Windows 7 OS. You might need to adapt the
-# helper functions in TestWindowsTerminalUnicode for other versions.
+# The Windows tests were developed on a Dutch Windows 7 OS. You might need to
+# adapt the helper functions in TestWindowsTerminalUnicode for other versions.
#
# For the Windows-based tests, you need the following packages installed:
# - pywin32, for clipboard access, which can be downloaded here:
@@ -21,7 +21,7 @@
# make sure to download the package for the correct python version!
#
# - pywinauto, to send keys to the terminal, which can be installed using:
-# easy_install --upgrade https://pywinauto.googlecode.com/files/pywinauto-0.4.2.zip
+# pip install -U pywinauto
#
#
from __future__ import absolute_import, division, unicode_literals
diff --git a/tests/utils.py b/tests/utils.py
index e9b7cf9..ff13b92 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -420,7 +420,8 @@
aliases = []
for alias in ('PrefixIndex', ):
# TODO: Not all follow that scheme (e.g. "BrokenRedirects")
- aliases.append({'realname': alias.capitalize(), 'aliases': [alias]})
+ aliases.append(
+ {'realname': alias.capitalize(), 'aliases': [alias]})
self._siteinfo._cache['specialpagealiases'] = (aliases, True)
self._msgcache = {'*': 'dummy entry', 'hello': 'world'}
diff --git a/tests/wikibase_edit_tests.py b/tests/wikibase_edit_tests.py
index 497cfa1..ee082d7 100644
--- a/tests/wikibase_edit_tests.py
+++ b/tests/wikibase_edit_tests.py
@@ -73,7 +73,8 @@
if 'P115' in item.claims:
item.removeClaims(item.claims['P115'])
- claim = pywikibot.page.Claim(testsite, 'P115', datatype='wikibase-item')
+ claim = pywikibot.page.Claim(
+ testsite, 'P115', datatype='wikibase-item')
target = pywikibot.ItemPage(testsite, 'Q271')
claim.setTarget(target)
@@ -94,7 +95,8 @@
to_remove.append({'id': claim.toJSON()['id'], 'remove': ''})
item.editEntity({'claims': to_remove})
- claim = pywikibot.page.Claim(testsite, 'P115', datatype='wikibase-item')
+ claim = pywikibot.page.Claim(
+ testsite, 'P115', datatype='wikibase-item')
target = pywikibot.ItemPage(testsite, 'Q271')
claim.setTarget(target)
item.editEntity({'claims': [claim.toJSON()]})
@@ -225,7 +227,8 @@
item = self._clean_item(testsite, 'P271')
# set new claim
- claim = pywikibot.page.Claim(testsite, 'P271', datatype='monolingualtext')
+ claim = pywikibot.page.Claim(
+ testsite, 'P271', datatype='monolingualtext')
target = pywikibot.WbMonolingualText(text='Test this!', language='en')
claim.setTarget(target)
item.addClaim(claim)
@@ -378,7 +381,8 @@
if 'P115' in item.claims:
item.removeClaims(item.claims['P115'])
- claim = pywikibot.page.Claim(testsite, 'P115', datatype='wikibase-item')
+ claim = pywikibot.page.Claim(
+ testsite, 'P115', datatype='wikibase-item')
target = pywikibot.ItemPage(testsite, 'Q271')
claim.setTarget(target)
item.addClaim(claim)
diff --git a/tests/wikibase_tests.py b/tests/wikibase_tests.py
index 6ec66a4..c979a41 100644
--- a/tests/wikibase_tests.py
+++ b/tests/wikibase_tests.py
@@ -1445,7 +1445,8 @@
wikidata = self.get_repo()
claim = pywikibot.Claim(wikidata, 'P569')
self.assertEqual(claim.type, 'time')
- claim.setTarget(pywikibot.WbTime(year=2001, month=1, day=1, site=wikidata))
+ claim.setTarget(pywikibot.WbTime(
+ year=2001, month=1, day=1, site=wikidata))
self.assertEqual(claim.target.year, 2001)
self.assertEqual(claim.target.month, 1)
self.assertEqual(claim.target.day, 1)
@@ -1676,7 +1677,8 @@
"""Test PreloadingEntityGenerator with ReferringPageGenerator."""
site = self.get_site('wikidata')
instance_of_page = pywikibot.Page(site, 'Property:P31')
- ref_gen = pagegenerators.ReferringPageGenerator(instance_of_page, total=5)
+ ref_gen = pagegenerators.ReferringPageGenerator(
+ instance_of_page, total=5)
gen = pagegenerators.PreloadingEntityGenerator(ref_gen)
self.assertTrue(all(isinstance(item, ItemPage) for item in gen))
diff --git a/tests/xmlreader_tests.py b/tests/xmlreader_tests.py
index 75bc121..ebd84ba 100644
--- a/tests/xmlreader_tests.py
+++ b/tests/xmlreader_tests.py
@@ -56,7 +56,8 @@
"""Test XmlDump correctly parsing whether a page is a redirect."""
pages = self._get_entries('article-pyrus.xml', allrevisions=True)
pages = [r for r in
- xmlreader.XmlDump(join_xml_data_path('article-pyrus.xml')).parse()]
+ xmlreader.XmlDump(
+ join_xml_data_path('article-pyrus.xml')).parse()]
self.assertTrue(pages[0].isredirect)
def _compare(self, previous, variant, all_revisions):
diff --git a/tox.ini b/tox.ini
index eef3f32..0dabaff 100644
--- a/tox.ini
+++ b/tox.ini
@@ -138,7 +138,6 @@
ignore = D105,D211,FI12,FI13,FI15,FI16,FI17,FI5,H101,H236,H301,H404,H405,H903,D401,D413,D412,P101,P102,P103,W503
exclude = .tox,.git,./*.egg,ez_setup.py,build,externals,user-config.py,./scripts/i18n/*,scripts/userscripts/*
min-version = 2.7
-max_line_length = 100
accept-encodings = utf-8
require-code = true
classmethod-decorators = classmethod,classproperty
@@ -276,7 +275,6 @@
[pep8]
exclude = .tox,.git,./*.egg,ez_setup.py,build,externals,user-config.py,./scripts/i18n/*,scripts/userscripts/*
-max_line_length = 100
[pep257]
# see explanations above
--
To view, visit https://gerrit.wikimedia.org/r/464777
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: I788b09ac54779ec46c6fad17911ed634c20b4d4a
Gerrit-Change-Number: 464777
Gerrit-PatchSet: 1
Gerrit-Owner: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot (75)
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/463735 )
Change subject: [tests] Set fast_finish: true
......................................................................
[tests] Set fast_finish: true
Immediately finish build once one of the jobs fails to decrease test time
Bug: T186323
Change-Id: I7131fd0bb74029088673c01c2ee0f9725efcff36
---
M .appveyor.yml
1 file changed, 1 insertion(+), 0 deletions(-)
Approvals:
Dvorapa: Looks good to me, but someone else must approve
Framawiki: Looks good to me, but someone else must approve
Dalba: Looks good to me, approved
jenkins-bot: Verified
diff --git a/.appveyor.yml b/.appveyor.yml
index f0d2506..23c5f08 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -15,6 +15,7 @@
PYSETUP_TEST_EXTRAS: "1"
matrix:
+ fast_finish: true
# Test the lowest supported release of each major Python version.
--
To view, visit https://gerrit.wikimedia.org/r/463735
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: I7131fd0bb74029088673c01c2ee0f9725efcff36
Gerrit-Change-Number: 463735
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: Framawiki <framawiki(a)tools.wmflabs.org>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: jenkins-bot (75)