jenkins-bot submitted this change.

View Change

Approvals: Matěj Suchánek: Looks good to me, approved jenkins-bot: Verified
[bugfix] ignore variables imported from __future__

Bug: T259285
Change-Id: I6e9fb0869df810702812b2239c3224c8c3309850
---
M generate_user_files.py
M pywikibot/config2.py
2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/generate_user_files.py b/generate_user_files.py
index 701b670..1e6a325 100755
--- a/generate_user_files.py
+++ b/generate_user_files.py
@@ -167,8 +167,6 @@


EXTENDED_CONFIG = """# -*- coding: utf-8 -*-
-from __future__ import absolute_import, division, unicode_literals
-
# This is an automatically generated file. You can find more configuration
# parameters in 'config.py' file.

diff --git a/pywikibot/config2.py b/pywikibot/config2.py
index 49482d5..3fd95a6 100644
--- a/pywikibot/config2.py
+++ b/pywikibot/config2.py
@@ -110,6 +110,7 @@
'line_separator', 'LS', 'panoramio', 'proxy', 'special_page_limit',
'sysopnames', 'use_mwparserfromhell', 'use_SSL_onlogin', 'use_SSL_always',
}
+_future_variables = {'absolute_import', 'division', 'unicode_literals'}

# ############# ACCOUNT SETTINGS ##############

@@ -1062,7 +1063,7 @@
if name in _deprecated_variables:
warn('\n' + fill(DEPRECATED_VARIABLE.format(name)),
_ConfigurationDeprecationWarning)
- else:
+ elif name not in _future_variables:
warn('\n'
+ fill('Configuration variable "{0}" is defined in your '
'user-config.py but unknown. It can be a '

To view, visit change 617511. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I6e9fb0869df810702812b2239c3224c8c3309850
Gerrit-Change-Number: 617511
Gerrit-PatchSet: 4
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: D3r1ck01 <xsavitar.wiki@aol.com>
Gerrit-Reviewer: Matěj Suchánek <matejsuchanek97@gmail.com>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged