jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/461946 )
Change subject: [fix] Make __future__ division mandatory ......................................................................
[fix] Make __future__ division mandatory
Division operator is different in Python 2 and Python 3. Always import python 3 behavior to be compatible.
Bug: T196865 Change-Id: I9760e217fdcd891e684b4cee581faa12af58515a --- M docs/conf.py M generate_family_file.py M generate_user_files.py M pwb.py M pywikibot/__init__.py M pywikibot/_wbtypes.py M pywikibot/backports.py M pywikibot/bot.py M pywikibot/bot_choice.py M pywikibot/botirc.py M pywikibot/comms/eventstreams.py M pywikibot/comms/http.py M pywikibot/comms/threadedhttp.py M pywikibot/compat/catlib.py M pywikibot/compat/query.py M pywikibot/compat/userlib.py M pywikibot/config2.py M pywikibot/cosmetic_changes.py M pywikibot/daemonize.py M pywikibot/data/api.py M pywikibot/data/mysql.py M pywikibot/data/sparql.py M pywikibot/data/wikistats.py M pywikibot/diff.py M pywikibot/echo.py M pywikibot/editor.py M pywikibot/exceptions.py M pywikibot/families/commons_family.py M pywikibot/families/i18n_family.py M pywikibot/families/incubator_family.py M pywikibot/families/lyricwiki_family.py M pywikibot/families/mediawiki_family.py M pywikibot/families/meta_family.py M pywikibot/families/omegawiki_family.py M pywikibot/families/osm_family.py M pywikibot/families/outreach_family.py M pywikibot/families/species_family.py M pywikibot/families/strategy_family.py M pywikibot/families/test_family.py M pywikibot/families/vikidia_family.py M pywikibot/families/wikia_family.py M pywikibot/families/wikibooks_family.py M pywikibot/families/wikidata_family.py M pywikibot/families/wikimania_family.py M pywikibot/families/wikimediachapter_family.py M pywikibot/families/wikinews_family.py M pywikibot/families/wikipedia_family.py M pywikibot/families/wikiquote_family.py M pywikibot/families/wikisource_family.py M pywikibot/families/wikitech_family.py M pywikibot/families/wikiversity_family.py M pywikibot/families/wikivoyage_family.py M pywikibot/families/wiktionary_family.py M pywikibot/families/wowwiki_family.py M pywikibot/family.py M pywikibot/fixes.py M pywikibot/flow.py M pywikibot/i18n.py M pywikibot/interwiki_graph.py M pywikibot/logentries.py M pywikibot/logging.py M pywikibot/login.py M pywikibot/page.py M pywikibot/pagegenerators.py M pywikibot/plural.py M pywikibot/proofreadpage.py M pywikibot/site.py M pywikibot/site_detect.py M pywikibot/specialbots.py M pywikibot/textlib.py M pywikibot/throttle.py M pywikibot/titletranslate.py M pywikibot/tools/__init__.py M pywikibot/tools/_logging.py M pywikibot/tools/chars.py M pywikibot/tools/djvu.py M pywikibot/tools/formatter.py M pywikibot/tools/ip.py M pywikibot/userinterfaces/cgi_interface.py M pywikibot/userinterfaces/gui.py M pywikibot/userinterfaces/terminal_interface.py M pywikibot/userinterfaces/terminal_interface_base.py M pywikibot/userinterfaces/terminal_interface_unix.py M pywikibot/userinterfaces/terminal_interface_win32.py M pywikibot/userinterfaces/transliteration.py M pywikibot/userinterfaces/win32_unicode.py M pywikibot/version.py M pywikibot/weblib.py M pywikibot/xmlreader.py M scripts/add_text.py M scripts/archive/featured.py M scripts/archivebot.py M scripts/basic.py M scripts/blockpageschecker.py M scripts/capitalize_redirects.py M scripts/casechecker.py M scripts/catall.py M scripts/category.py M scripts/category_redirect.py M scripts/cfd.py M scripts/checkimages.py M scripts/claimit.py M scripts/commons_link.py M scripts/commonscat.py M scripts/coordinate_import.py M scripts/cosmetic_changes.py M scripts/create_categories.py M scripts/data_ingestion.py M scripts/delete.py M scripts/disambredir.py M scripts/djvutext.py M scripts/editarticle.py M scripts/fixing_redirects.py M scripts/flickrripper.py M scripts/followlive.py M scripts/freebasemappingupload.py M scripts/harvest_template.py M scripts/illustrate_wikidata.py M scripts/image.py M scripts/imagecopy.py M scripts/imagecopy_self.py M scripts/imageharvest.py M scripts/imagerecat.py M scripts/imagetransfer.py M scripts/imageuncat.py M scripts/interwiki.py M scripts/interwikidata.py M scripts/isbn.py M scripts/listpages.py M scripts/login.py M scripts/lonelypages.py M scripts/maintenance/cache.py M scripts/maintenance/colors.py M scripts/maintenance/compat2core.py M scripts/maintenance/diff_checker.py M scripts/maintenance/make_i18n_dict.py M scripts/maintenance/wikimedia_sites.py M scripts/makecat.py M scripts/misspelling.py M scripts/movepages.py M scripts/ndashredir.py M scripts/newitem.py M scripts/noreferences.py M scripts/nowcommons.py M scripts/pagefromfile.py M scripts/patrol.py M scripts/piper.py M scripts/protect.py M scripts/redirect.py M scripts/replace.py M scripts/replicate_wiki.py M scripts/revertbot.py M scripts/script_wui.py M scripts/selflink.py M scripts/shell.py M scripts/solve_disambiguation.py M scripts/spamremove.py M scripts/standardize_interwiki.py M scripts/states_redirect.py M scripts/surnames_redirects.py M scripts/table2wiki.py M scripts/template.py M scripts/templatecount.py M scripts/touch.py M scripts/transferbot.py M scripts/unlink.py M scripts/unusedfiles.py M scripts/upload.py M scripts/version.py M scripts/watchlist.py M scripts/weblinkchecker.py M scripts/welcome.py M scripts/wikisourcetext.py M setup.py M tests/__init__.py M tests/add_text_tests.py M tests/api_tests.py M tests/archivebot_tests.py M tests/aspects.py M tests/basepage_tests.py M tests/bot_tests.py M tests/cache_tests.py M tests/category_bot_tests.py M tests/category_tests.py M tests/checkimages_tests.py M tests/conftest.py M tests/cosmetic_changes_tests.py M tests/data/fixes.py M tests/data/set-fixes.py M tests/data_ingestion_tests.py M tests/date_tests.py M tests/deletionbot_tests.py M tests/deprecation_tests.py M tests/diff_tests.py M tests/disambredir_tests.py M tests/djvu_tests.py M tests/dry_api_tests.py M tests/dry_site_tests.py M tests/edit_failure_tests.py M tests/edit_tests.py M tests/eventstreams_tests.py M tests/exceptions_tests.py M tests/family_tests.py M tests/file_tests.py M tests/fixes_tests.py M tests/fixing_redirects_tests.py M tests/flow_edit_tests.py M tests/flow_tests.py M tests/flow_thanks_tests.py M tests/generate_family_files_tests.py M tests/generate_user_files_tests.py M tests/http_tests.py M tests/i18n/pywikibot.py M tests/i18n_tests.py M tests/imagecopy_tests.py M tests/interwiki_graph_tests.py M tests/interwiki_link_tests.py M tests/interwikidata_tests.py M tests/isbn_tests.py M tests/l10n_tests.py M tests/link_tests.py M tests/logentry_tests.py M tests/login_tests.py M tests/mediawikiversion_tests.py M tests/namespace_tests.py M tests/noreferences_tests.py M tests/oauth_tests.py M tests/page_tests.py M tests/pagegenerators_tests.py M tests/paraminfo_tests.py M tests/patrolbot_tests.py M tests/plural_tests.py M tests/proofreadpage_tests.py M tests/protectbot_tests.py M tests/pwb/print_env.py M tests/pwb/print_locals.py M tests/pwb/print_unicode.py M tests/pwb_tests.py M tests/python_tests.py M tests/redirect_bot_tests.py M tests/reflinks_tests.py M tests/replacebot_tests.py M tests/script_tests.py M tests/site_detect_tests.py M tests/site_tests.py M tests/sparql_tests.py M tests/template_bot_tests.py M tests/tests_tests.py M tests/textlib_tests.py M tests/thanks_tests.py M tests/thread_tests.py M tests/timestamp_tests.py M tests/timestripper_tests.py M tests/tk_tests.py M tests/tools_chars_tests.py M tests/tools_formatter_tests.py M tests/tools_ip_tests.py M tests/tools_tests.py M tests/ui_options_tests.py M tests/ui_tests.py M tests/upload_tests.py M tests/uploadbot_tests.py M tests/user_tests.py M tests/utils.py M tests/weblib_tests.py M tests/weblinkchecker_tests.py M tests/wikibase_edit_tests.py M tests/wikibase_tests.py M tests/wikistats_tests.py M tests/xmlreader_tests.py M tox.ini 271 files changed, 349 insertions(+), 340 deletions(-)
Approvals: Dalba: Looks good to me, approved jenkins-bot: Verified
diff --git a/docs/conf.py b/docs/conf.py index e08c3d4..375d1e0 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -15,7 +15,7 @@ # # All configuration values have a default; values that are commented out # serve to show the default. -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import os from os.path import abspath, dirname, join diff --git a/generate_family_file.py b/generate_family_file.py index 34a1a09..0a390c7 100755 --- a/generate_family_file.py +++ b/generate_family_file.py @@ -140,7 +140,7 @@
Please do not commit this to the Git repository! """ -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import family from pywikibot.tools import deprecated diff --git a/generate_user_files.py b/generate_user_files.py index aa502b7..7f642a31 100755 --- a/generate_user_files.py +++ b/generate_user_files.py @@ -6,7 +6,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import codecs from collections import namedtuple @@ -168,7 +168,7 @@
EXTENDED_CONFIG = """# -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
# This is an automatically generated file. You can find more configuration # parameters in 'config.py' file. @@ -218,12 +218,13 @@
{config_text}"""
-SMALL_CONFIG = ('# -*- coding: utf-8 -*-\n' - 'from __future__ import absolute_import, unicode_literals\n' - "family = '{main_family}'\n" - "mylang = '{main_code}'\n" - '{usernames}\n' - '{botpasswords}\n') +SMALL_CONFIG = """# -*- coding: utf-8 -*- +from __future__ import absolute_import, division, unicode_literals +family = '{main_family}' +mylang = '{main_code}' +{usernames} +{botpasswords} +"""
PASSFILE_CONFIG = """# This is an automatically generated file used to store # BotPasswords. diff --git a/pwb.py b/pwb.py index b71a78d..2ed6a9b 100755 --- a/pwb.py +++ b/pwb.py @@ -13,7 +13,8 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, print_function, unicode_literals +from __future__ import (absolute_import, division, + print_function, unicode_literals)
import os import sys diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py index 5ba23cc..76fa14c 100644 --- a/pywikibot/__init__.py +++ b/pywikibot/__init__.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
__version__ = __release__ = '3.1.dev0' __url__ = 'https://www.mediawiki.org/wiki/Manual:Pywikibot' diff --git a/pywikibot/_wbtypes.py b/pywikibot/_wbtypes.py index cf64e1a..15e5639 100644 --- a/pywikibot/_wbtypes.py +++ b/pywikibot/_wbtypes.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Wikibase data type classes.""" # -# (C) Pywikibot team, 2013-2017 +# (C) Pywikibot team, 2013-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import json
diff --git a/pywikibot/backports.py b/pywikibot/backports.py index 65a01b1..a190eba 100644 --- a/pywikibot/backports.py +++ b/pywikibot/backports.py @@ -10,7 +10,7 @@ # Distributed under the terms of the MIT license. #
-from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from difflib import _format_range_unified import logging diff --git a/pywikibot/bot.py b/pywikibot/bot.py index ddeeeb8..a700824 100644 --- a/pywikibot/bot.py +++ b/pywikibot/bot.py @@ -52,7 +52,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
__all__ = ( 'CRITICAL', 'ERROR', 'INFO', 'WARNING', 'DEBUG', 'INPUT', 'STDOUT', diff --git a/pywikibot/bot_choice.py b/pywikibot/bot_choice.py index ff09f6a..b0da55f 100755 --- a/pywikibot/bot_choice.py +++ b/pywikibot/bot_choice.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import re from textwrap import fill diff --git a/pywikibot/botirc.py b/pywikibot/botirc.py index 2aedc7b..65ad17c 100644 --- a/pywikibot/botirc.py +++ b/pywikibot/botirc.py @@ -11,7 +11,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
# Note: the intention is to develop this module (at some point) into a Bot # class definition that can be subclassed to create new, functional bot diff --git a/pywikibot/comms/eventstreams.py b/pywikibot/comms/eventstreams.py index a4695b3..09a46b9 100644 --- a/pywikibot/comms/eventstreams.py +++ b/pywikibot/comms/eventstreams.py @@ -13,7 +13,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from distutils.version import LooseVersion from functools import partial diff --git a/pywikibot/comms/http.py b/pywikibot/comms/http.py index 41850eb..bab5621 100644 --- a/pywikibot/comms/http.py +++ b/pywikibot/comms/http.py @@ -16,7 +16,8 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, print_function, unicode_literals +from __future__ import (absolute_import, division, + print_function, unicode_literals)
__docformat__ = 'epytext' diff --git a/pywikibot/comms/threadedhttp.py b/pywikibot/comms/threadedhttp.py index 3953289..651d26f 100644 --- a/pywikibot/comms/threadedhttp.py +++ b/pywikibot/comms/threadedhttp.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
__docformat__ = 'epytext' diff --git a/pywikibot/compat/catlib.py b/pywikibot/compat/catlib.py index 43f0ca5..1214f95 100644 --- a/pywikibot/compat/catlib.py +++ b/pywikibot/compat/catlib.py @@ -11,7 +11,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import Category from pywikibot.tools import ModuleDeprecationWrapper diff --git a/pywikibot/compat/query.py b/pywikibot/compat/query.py index ac5f24f..0da5ab5 100644 --- a/pywikibot/compat/query.py +++ b/pywikibot/compat/query.py @@ -11,7 +11,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot from pywikibot.data import api diff --git a/pywikibot/compat/userlib.py b/pywikibot/compat/userlib.py index e6aec79..1c34231 100644 --- a/pywikibot/compat/userlib.py +++ b/pywikibot/compat/userlib.py @@ -11,7 +11,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot.page import User from pywikibot.tools import ModuleDeprecationWrapper diff --git a/pywikibot/config2.py b/pywikibot/config2.py index 2301de9..f7c40e3 100644 --- a/pywikibot/config2.py +++ b/pywikibot/config2.py @@ -37,7 +37,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import collections import os diff --git a/pywikibot/cosmetic_changes.py b/pywikibot/cosmetic_changes.py index 318515a..a10a6e9 100755 --- a/pywikibot/cosmetic_changes.py +++ b/pywikibot/cosmetic_changes.py @@ -57,7 +57,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import re
diff --git a/pywikibot/daemonize.py b/pywikibot/daemonize.py index 733080b..03a1532 100644 --- a/pywikibot/daemonize.py +++ b/pywikibot/daemonize.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Module to daemonize the current process on Unix.""" # -# (C) Pywikibot team, 2007-2015 +# (C) Pywikibot team, 2007-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import codecs import os diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py index f10e838..cc1fa7f 100644 --- a/pywikibot/data/api.py +++ b/pywikibot/data/api.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import datetime import hashlib diff --git a/pywikibot/data/mysql.py b/pywikibot/data/mysql.py index 77aef83..193c9a7 100644 --- a/pywikibot/data/mysql.py +++ b/pywikibot/data/mysql.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot
diff --git a/pywikibot/data/sparql.py b/pywikibot/data/sparql.py index 6dc47fd..e18c625 100644 --- a/pywikibot/data/sparql.py +++ b/pywikibot/data/sparql.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import json import sys diff --git a/pywikibot/data/wikistats.py b/pywikibot/data/wikistats.py index 2c079fc..0e6c3e0 100644 --- a/pywikibot/data/wikistats.py +++ b/pywikibot/data/wikistats.py @@ -4,7 +4,7 @@ # (C) Pywikibot team, 2014-2018 # # Distributed under the terms of the MIT license. -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import sys from io import BytesIO, StringIO diff --git a/pywikibot/diff.py b/pywikibot/diff.py index e41db4c..fa5d2b7 100644 --- a/pywikibot/diff.py +++ b/pywikibot/diff.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import difflib import math diff --git a/pywikibot/echo.py b/pywikibot/echo.py index a66be12..217c02d 100644 --- a/pywikibot/echo.py +++ b/pywikibot/echo.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot
diff --git a/pywikibot/editor.py b/pywikibot/editor.py index 86220fd..799d60f 100644 --- a/pywikibot/editor.py +++ b/pywikibot/editor.py @@ -7,7 +7,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import codecs import os diff --git a/pywikibot/exceptions.py b/pywikibot/exceptions.py index eb1f8cb..5014ad2 100644 --- a/pywikibot/exceptions.py +++ b/pywikibot/exceptions.py @@ -85,7 +85,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot.tools import ( # __ to avoid conflict with ModuleDeprecationWrapper._deprecated diff --git a/pywikibot/families/commons_family.py b/pywikibot/families/commons_family.py index 130c761..ebd2b71 100644 --- a/pywikibot/families/commons_family.py +++ b/pywikibot/families/commons_family.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import family
diff --git a/pywikibot/families/i18n_family.py b/pywikibot/families/i18n_family.py index 6988d12..90db28d 100644 --- a/pywikibot/families/i18n_family.py +++ b/pywikibot/families/i18n_family.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Family module for Translate Wiki.""" # -# (C) Pywikibot team, 2007-2015 +# (C) Pywikibot team, 2007-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import family
diff --git a/pywikibot/families/incubator_family.py b/pywikibot/families/incubator_family.py index c0acb93..5dc112c 100644 --- a/pywikibot/families/incubator_family.py +++ b/pywikibot/families/incubator_family.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Family module for Incubator Wiki.""" # -# (C) Pywikibot team, 2006-2015 +# (C) Pywikibot team, 2006-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import family
diff --git a/pywikibot/families/lyricwiki_family.py b/pywikibot/families/lyricwiki_family.py index a155703..c60ded6 100644 --- a/pywikibot/families/lyricwiki_family.py +++ b/pywikibot/families/lyricwiki_family.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Family module for LyricWiki.""" # -# (C) Pywikibot team, 2007-2015 +# (C) Pywikibot team, 2007-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import family
diff --git a/pywikibot/families/mediawiki_family.py b/pywikibot/families/mediawiki_family.py index 5d5a367..a8c18fa 100644 --- a/pywikibot/families/mediawiki_family.py +++ b/pywikibot/families/mediawiki_family.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Family module for MediaWiki wiki.""" # -# (C) Pywikibot team, 2006-2015 +# (C) Pywikibot team, 2006-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import family
diff --git a/pywikibot/families/meta_family.py b/pywikibot/families/meta_family.py index a193e72..83ed5d8 100644 --- a/pywikibot/families/meta_family.py +++ b/pywikibot/families/meta_family.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import family
diff --git a/pywikibot/families/omegawiki_family.py b/pywikibot/families/omegawiki_family.py index 7db781e..692a0fa 100644 --- a/pywikibot/families/omegawiki_family.py +++ b/pywikibot/families/omegawiki_family.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import family
diff --git a/pywikibot/families/osm_family.py b/pywikibot/families/osm_family.py index a000e91..649ea96 100644 --- a/pywikibot/families/osm_family.py +++ b/pywikibot/families/osm_family.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Family module for OpenStreetMap wiki.""" # -# (C) Pywikibot team, 2009-2015 +# (C) Pywikibot team, 2009-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import family
diff --git a/pywikibot/families/outreach_family.py b/pywikibot/families/outreach_family.py index 76e8fb6..ce476b5 100644 --- a/pywikibot/families/outreach_family.py +++ b/pywikibot/families/outreach_family.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import family
diff --git a/pywikibot/families/species_family.py b/pywikibot/families/species_family.py index 07604d6..55b57fe 100644 --- a/pywikibot/families/species_family.py +++ b/pywikibot/families/species_family.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import family
diff --git a/pywikibot/families/strategy_family.py b/pywikibot/families/strategy_family.py index 8cb4cc4..ede4119 100644 --- a/pywikibot/families/strategy_family.py +++ b/pywikibot/families/strategy_family.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import family
diff --git a/pywikibot/families/test_family.py b/pywikibot/families/test_family.py index 63af715..0d50669 100644 --- a/pywikibot/families/test_family.py +++ b/pywikibot/families/test_family.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Family module for test.wikipedia.org.""" # -# (C) Pywikibot team, 2007-2015 +# (C) Pywikibot team, 2007-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import family
diff --git a/pywikibot/families/vikidia_family.py b/pywikibot/families/vikidia_family.py index 61d28da..999ffd5 100755 --- a/pywikibot/families/vikidia_family.py +++ b/pywikibot/families/vikidia_family.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Family module for Vikidia.""" # -# (C) Pywikibot team, 2010-2017 +# (C) Pywikibot team, 2010-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import family
diff --git a/pywikibot/families/wikia_family.py b/pywikibot/families/wikia_family.py index 85fc734..669aa10 100644 --- a/pywikibot/families/wikia_family.py +++ b/pywikibot/families/wikia_family.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import family from pywikibot.tools import deprecated diff --git a/pywikibot/families/wikibooks_family.py b/pywikibot/families/wikibooks_family.py index 968bdad..ee5a169 100644 --- a/pywikibot/families/wikibooks_family.py +++ b/pywikibot/families/wikibooks_family.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import family
diff --git a/pywikibot/families/wikidata_family.py b/pywikibot/families/wikidata_family.py index 224f48b..fe11d15 100644 --- a/pywikibot/families/wikidata_family.py +++ b/pywikibot/families/wikidata_family.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import config from pywikibot import family diff --git a/pywikibot/families/wikimania_family.py b/pywikibot/families/wikimania_family.py index 2f12952..bf8b65c 100644 --- a/pywikibot/families/wikimania_family.py +++ b/pywikibot/families/wikimania_family.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import family
diff --git a/pywikibot/families/wikimediachapter_family.py b/pywikibot/families/wikimediachapter_family.py index 23c4257..3a7be5a 100644 --- a/pywikibot/families/wikimediachapter_family.py +++ b/pywikibot/families/wikimediachapter_family.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import family from pywikibot.tools import deprecated, classproperty diff --git a/pywikibot/families/wikinews_family.py b/pywikibot/families/wikinews_family.py index e587151..b6d80cb 100644 --- a/pywikibot/families/wikinews_family.py +++ b/pywikibot/families/wikinews_family.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import family
diff --git a/pywikibot/families/wikipedia_family.py b/pywikibot/families/wikipedia_family.py index 635505b..8480ad5 100644 --- a/pywikibot/families/wikipedia_family.py +++ b/pywikibot/families/wikipedia_family.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import family
diff --git a/pywikibot/families/wikiquote_family.py b/pywikibot/families/wikiquote_family.py index 6f0b112..8609f1b 100644 --- a/pywikibot/families/wikiquote_family.py +++ b/pywikibot/families/wikiquote_family.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import family
diff --git a/pywikibot/families/wikisource_family.py b/pywikibot/families/wikisource_family.py index ea3079c..2dac50c 100644 --- a/pywikibot/families/wikisource_family.py +++ b/pywikibot/families/wikisource_family.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import family from pywikibot.tools import classproperty diff --git a/pywikibot/families/wikitech_family.py b/pywikibot/families/wikitech_family.py index f9adfe0..b75cf86 100644 --- a/pywikibot/families/wikitech_family.py +++ b/pywikibot/families/wikitech_family.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Family module for Wikitech.""" # -# (C) Pywikibot team, 2005-2015 +# (C) Pywikibot team, 2005-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import family
diff --git a/pywikibot/families/wikiversity_family.py b/pywikibot/families/wikiversity_family.py index 8df4985..c6e713a 100644 --- a/pywikibot/families/wikiversity_family.py +++ b/pywikibot/families/wikiversity_family.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import family
diff --git a/pywikibot/families/wikivoyage_family.py b/pywikibot/families/wikivoyage_family.py index 3b7e784..2e0d717 100644 --- a/pywikibot/families/wikivoyage_family.py +++ b/pywikibot/families/wikivoyage_family.py @@ -6,7 +6,7 @@ # Distributed under the terms of the MIT license. # # The new wikivoyage family that is hosted at wikimedia -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import family
diff --git a/pywikibot/families/wiktionary_family.py b/pywikibot/families/wiktionary_family.py index 95ff328..d34e58b 100644 --- a/pywikibot/families/wiktionary_family.py +++ b/pywikibot/families/wiktionary_family.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import family from pywikibot.tools import classproperty diff --git a/pywikibot/families/wowwiki_family.py b/pywikibot/families/wowwiki_family.py index 117eec3..5a5f429 100644 --- a/pywikibot/families/wowwiki_family.py +++ b/pywikibot/families/wowwiki_family.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import family from pywikibot.tools import deprecated, classproperty diff --git a/pywikibot/family.py b/pywikibot/family.py index 2fb004c..bdbaf7e 100644 --- a/pywikibot/family.py +++ b/pywikibot/family.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import collections from importlib import import_module diff --git a/pywikibot/fixes.py b/pywikibot/fixes.py index ffa8636..632f516 100644 --- a/pywikibot/fixes.py +++ b/pywikibot/fixes.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import os.path
diff --git a/pywikibot/flow.py b/pywikibot/flow.py index 35b67d1..ab32dea 100644 --- a/pywikibot/flow.py +++ b/pywikibot/flow.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import logging
diff --git a/pywikibot/i18n.py b/pywikibot/i18n.py index e81873e..8165da1 100644 --- a/pywikibot/i18n.py +++ b/pywikibot/i18n.py @@ -21,7 +21,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import json import os diff --git a/pywikibot/interwiki_graph.py b/pywikibot/interwiki_graph.py index 34b22f5..5b3db23 100644 --- a/pywikibot/interwiki_graph.py +++ b/pywikibot/interwiki_graph.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from collections import Counter import itertools diff --git a/pywikibot/logentries.py b/pywikibot/logentries.py index 8513e72..8014d73 100644 --- a/pywikibot/logentries.py +++ b/pywikibot/logentries.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import sys
diff --git a/pywikibot/logging.py b/pywikibot/logging.py index de5eb10..17b9878 100644 --- a/pywikibot/logging.py +++ b/pywikibot/logging.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import logging import os diff --git a/pywikibot/login.py b/pywikibot/login.py index 56fad1a..0eca2d3 100644 --- a/pywikibot/login.py +++ b/pywikibot/login.py @@ -7,7 +7,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import codecs import os diff --git a/pywikibot/page.py b/pywikibot/page.py index 4de9d02..fce9810 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -16,7 +16,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import hashlib import logging diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py index 7be9948..414840c3 100644 --- a/pywikibot/pagegenerators.py +++ b/pywikibot/pagegenerators.py @@ -18,7 +18,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import calendar import codecs diff --git a/pywikibot/plural.py b/pywikibot/plural.py index 61e810c..a33fdda 100644 --- a/pywikibot/plural.py +++ b/pywikibot/plural.py @@ -2,11 +2,11 @@ """Module containing plural rules of various languages.""" # # (C) xqt, 2011-2017 -# (C) Pywikibot team, 2011-2017 +# (C) Pywikibot team, 2011-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
plural_rules = { diff --git a/pywikibot/proofreadpage.py b/pywikibot/proofreadpage.py index 348f67e..17612d9 100644 --- a/pywikibot/proofreadpage.py +++ b/pywikibot/proofreadpage.py @@ -22,7 +22,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from functools import partial import json diff --git a/pywikibot/site.py b/pywikibot/site.py index 304dcdc..a82b5a8 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -10,7 +10,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import copy import datetime diff --git a/pywikibot/site_detect.py b/pywikibot/site_detect.py index a591448..0a38a05 100644 --- a/pywikibot/site_detect.py +++ b/pywikibot/site_detect.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import json import re diff --git a/pywikibot/specialbots.py b/pywikibot/specialbots.py index fab63ea..fcd6464 100644 --- a/pywikibot/specialbots.py +++ b/pywikibot/specialbots.py @@ -7,7 +7,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import os import tempfile diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py index b58ae27..56fc2c0 100644 --- a/pywikibot/textlib.py +++ b/pywikibot/textlib.py @@ -11,7 +11,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from collections import OrderedDict, namedtuple try: diff --git a/pywikibot/throttle.py b/pywikibot/throttle.py index d722006..d1f4d43 100644 --- a/pywikibot/throttle.py +++ b/pywikibot/throttle.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import math import threading diff --git a/pywikibot/titletranslate.py b/pywikibot/titletranslate.py index 99110bd..ea1240a 100644 --- a/pywikibot/titletranslate.py +++ b/pywikibot/titletranslate.py @@ -7,7 +7,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import re
diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py index 9d24df3..f5ee5b6 100644 --- a/pywikibot/tools/__init__.py +++ b/pywikibot/tools/__init__.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import collections import gzip diff --git a/pywikibot/tools/_logging.py b/pywikibot/tools/_logging.py index 24717a4..33cfdd7 100644 --- a/pywikibot/tools/_logging.py +++ b/pywikibot/tools/_logging.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import logging import os diff --git a/pywikibot/tools/chars.py b/pywikibot/tools/chars.py index b92c478..5c1eca5 100644 --- a/pywikibot/tools/chars.py +++ b/pywikibot/tools/chars.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import sys
diff --git a/pywikibot/tools/djvu.py b/pywikibot/tools/djvu.py index a33659d..381d816 100644 --- a/pywikibot/tools/djvu.py +++ b/pywikibot/tools/djvu.py @@ -6,7 +6,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from collections import Counter import os diff --git a/pywikibot/tools/formatter.py b/pywikibot/tools/formatter.py index ebeacf9..e983696 100644 --- a/pywikibot/tools/formatter.py +++ b/pywikibot/tools/formatter.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import math
diff --git a/pywikibot/tools/ip.py b/pywikibot/tools/ip.py index 3fba28c..27017a4 100644 --- a/pywikibot/tools/ip.py +++ b/pywikibot/tools/ip.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """IP address tools module.""" # -# (C) Pywikibot team, 2014-2016 +# (C) Pywikibot team, 2014-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import re import sys diff --git a/pywikibot/userinterfaces/cgi_interface.py b/pywikibot/userinterfaces/cgi_interface.py index 91a9ba7..44a5cbb 100644 --- a/pywikibot/userinterfaces/cgi_interface.py +++ b/pywikibot/userinterfaces/cgi_interface.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """CGI user interface.""" # -# (C) Pywikibot team, 2007-2015 +# (C) Pywikibot team, 2007-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import sys
diff --git a/pywikibot/userinterfaces/gui.py b/pywikibot/userinterfaces/gui.py index 0f89bcd..9ce6278 100644 --- a/pywikibot/userinterfaces/gui.py +++ b/pywikibot/userinterfaces/gui.py @@ -12,7 +12,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import sys
diff --git a/pywikibot/userinterfaces/terminal_interface.py b/pywikibot/userinterfaces/terminal_interface.py index e4e898a..154d9e8 100644 --- a/pywikibot/userinterfaces/terminal_interface.py +++ b/pywikibot/userinterfaces/terminal_interface.py @@ -5,11 +5,11 @@ It imports the appropriate operating system specific implementation. """ # -# (C) Pywikibot team, 2003-2015 +# (C) Pywikibot team, 2003-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import sys
diff --git a/pywikibot/userinterfaces/terminal_interface_base.py b/pywikibot/userinterfaces/terminal_interface_base.py index 0f03f51..4793295 100755 --- a/pywikibot/userinterfaces/terminal_interface_base.py +++ b/pywikibot/userinterfaces/terminal_interface_base.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import getpass import logging diff --git a/pywikibot/userinterfaces/terminal_interface_unix.py b/pywikibot/userinterfaces/terminal_interface_unix.py index 2219678..517bb2c 100755 --- a/pywikibot/userinterfaces/terminal_interface_unix.py +++ b/pywikibot/userinterfaces/terminal_interface_unix.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import re import sys diff --git a/pywikibot/userinterfaces/terminal_interface_win32.py b/pywikibot/userinterfaces/terminal_interface_win32.py index 51a86ff..6b94693 100755 --- a/pywikibot/userinterfaces/terminal_interface_win32.py +++ b/pywikibot/userinterfaces/terminal_interface_win32.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot.userinterfaces import ( terminal_interface_base, diff --git a/pywikibot/userinterfaces/transliteration.py b/pywikibot/userinterfaces/transliteration.py index 5eac397..01bb065 100644 --- a/pywikibot/userinterfaces/transliteration.py +++ b/pywikibot/userinterfaces/transliteration.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
_trans = { 'À': 'A', 'Á': 'A', 'Â': 'A', 'Ầ': 'A', 'Ấ': 'A', 'Ẫ': 'A', 'Ẩ': 'A', diff --git a/pywikibot/userinterfaces/win32_unicode.py b/pywikibot/userinterfaces/win32_unicode.py index 3287e0a..aae84a1 100755 --- a/pywikibot/userinterfaces/win32_unicode.py +++ b/pywikibot/userinterfaces/win32_unicode.py @@ -24,7 +24,8 @@ # Licensed under both CC-BY-SA and the MIT license. # ################################################ -from __future__ import absolute_import, print_function, unicode_literals +from __future__ import (absolute_import, division, + print_function, unicode_literals)
import codecs import sys diff --git a/pywikibot/version.py b/pywikibot/version.py index 5baa8ac..0904254 100644 --- a/pywikibot/version.py +++ b/pywikibot/version.py @@ -7,7 +7,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import codecs import datetime diff --git a/pywikibot/weblib.py b/pywikibot/weblib.py index 6900128..f73114c 100644 --- a/pywikibot/weblib.py +++ b/pywikibot/weblib.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import json import sys diff --git a/pywikibot/xmlreader.py b/pywikibot/xmlreader.py index 39b5d7c..3eb5050 100644 --- a/pywikibot/xmlreader.py +++ b/pywikibot/xmlreader.py @@ -13,7 +13,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import re import threading diff --git a/scripts/add_text.py b/scripts/add_text.py index 8c220c1..77e408a 100755 --- a/scripts/add_text.py +++ b/scripts/add_text.py @@ -61,7 +61,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import codecs import re diff --git a/scripts/archive/featured.py b/scripts/archive/featured.py index 9fe974f..13f2866 100755 --- a/scripts/archive/featured.py +++ b/scripts/archive/featured.py @@ -61,7 +61,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pickle import re diff --git a/scripts/archivebot.py b/scripts/archivebot.py index 692d343..5412d60 100755 --- a/scripts/archivebot.py +++ b/scripts/archivebot.py @@ -95,7 +95,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import datetime import locale diff --git a/scripts/basic.py b/scripts/basic.py index bc9b550..71d14fe 100755 --- a/scripts/basic.py +++ b/scripts/basic.py @@ -29,7 +29,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot from pywikibot import pagegenerators diff --git a/scripts/blockpageschecker.py b/scripts/blockpageschecker.py index 085e487..e72b70d 100755 --- a/scripts/blockpageschecker.py +++ b/scripts/blockpageschecker.py @@ -55,7 +55,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import re import time diff --git a/scripts/capitalize_redirects.py b/scripts/capitalize_redirects.py index 063b8ab..eaf2c4f 100755 --- a/scripts/capitalize_redirects.py +++ b/scripts/capitalize_redirects.py @@ -31,7 +31,7 @@ # # Automatically converted from compat branch by compat2core.py script # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot from pywikibot import i18n, pagegenerators diff --git a/scripts/casechecker.py b/scripts/casechecker.py index 7986ba4..ecac4c7 100755 --- a/scripts/casechecker.py +++ b/scripts/casechecker.py @@ -6,7 +6,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import codecs import itertools diff --git a/scripts/catall.py b/scripts/catall.py index 1e6ad4f..6885894 100755 --- a/scripts/catall.py +++ b/scripts/catall.py @@ -25,7 +25,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot from pywikibot import i18n, textlib diff --git a/scripts/category.py b/scripts/category.py index 757348d..6cf2cbf 100755 --- a/scripts/category.py +++ b/scripts/category.py @@ -118,7 +118,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import codecs import math diff --git a/scripts/category_redirect.py b/scripts/category_redirect.py index 1850d05..3cc76ed 100755 --- a/scripts/category_redirect.py +++ b/scripts/category_redirect.py @@ -27,7 +27,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import re import sys diff --git a/scripts/cfd.py b/scripts/cfd.py index 4d15c8a..ddb15f8 100755 --- a/scripts/cfd.py +++ b/scripts/cfd.py @@ -17,7 +17,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import re import sys diff --git a/scripts/checkimages.py b/scripts/checkimages.py index 7d6ae91..e71be3a 100755 --- a/scripts/checkimages.py +++ b/scripts/checkimages.py @@ -85,7 +85,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import collections import re diff --git a/scripts/claimit.py b/scripts/claimit.py index c134ff4..61e4923 100755 --- a/scripts/claimit.py +++ b/scripts/claimit.py @@ -52,7 +52,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot from pywikibot import pagegenerators, WikidataBot diff --git a/scripts/commons_link.py b/scripts/commons_link.py index c5525e3..e07e058 100755 --- a/scripts/commons_link.py +++ b/scripts/commons_link.py @@ -31,7 +31,7 @@ # Ported by Geoffrey "GEOFBOT" Mon for Google Code-In 2013 # User:Sn1per # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import re
diff --git a/scripts/commonscat.py b/scripts/commonscat.py index 9ec63d4..1ad4a1f 100755 --- a/scripts/commonscat.py +++ b/scripts/commonscat.py @@ -57,7 +57,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import re
diff --git a/scripts/coordinate_import.py b/scripts/coordinate_import.py index e8c4f4c..577568a 100755 --- a/scripts/coordinate_import.py +++ b/scripts/coordinate_import.py @@ -33,7 +33,7 @@ # # Distributed under the terms of MIT License. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot from pywikibot import pagegenerators, WikidataBot diff --git a/scripts/cosmetic_changes.py b/scripts/cosmetic_changes.py index 0c62f19..80fe07c 100644 --- a/scripts/cosmetic_changes.py +++ b/scripts/cosmetic_changes.py @@ -31,7 +31,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot
diff --git a/scripts/create_categories.py b/scripts/create_categories.py index 9e43ccd..3f0e651 100755 --- a/scripts/create_categories.py +++ b/scripts/create_categories.py @@ -37,7 +37,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot from pywikibot import pagegenerators, Bot diff --git a/scripts/data_ingestion.py b/scripts/data_ingestion.py index 709dc5d..83cc324 100755 --- a/scripts/data_ingestion.py +++ b/scripts/data_ingestion.py @@ -12,7 +12,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import base64 import codecs diff --git a/scripts/delete.py b/scripts/delete.py index 6c995c1..78adda2 100755 --- a/scripts/delete.py +++ b/scripts/delete.py @@ -54,7 +54,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import collections
diff --git a/scripts/disambredir.py b/scripts/disambredir.py index 5b1e736..cca775a 100755 --- a/scripts/disambredir.py +++ b/scripts/disambredir.py @@ -16,7 +16,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot
diff --git a/scripts/djvutext.py b/scripts/djvutext.py index 79dbf16..1ede95a 100644 --- a/scripts/djvutext.py +++ b/scripts/djvutext.py @@ -32,7 +32,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import os.path
diff --git a/scripts/editarticle.py b/scripts/editarticle.py index b1dc3da..47446ec 100755 --- a/scripts/editarticle.py +++ b/scripts/editarticle.py @@ -27,7 +27,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import argparse import os diff --git a/scripts/fixing_redirects.py b/scripts/fixing_redirects.py index 592806b..0e5c215 100755 --- a/scripts/fixing_redirects.py +++ b/scripts/fixing_redirects.py @@ -17,7 +17,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import re
diff --git a/scripts/flickrripper.py b/scripts/flickrripper.py index 9efd9df..6437bce 100755 --- a/scripts/flickrripper.py +++ b/scripts/flickrripper.py @@ -30,7 +30,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import base64 import hashlib diff --git a/scripts/followlive.py b/scripts/followlive.py index 4dbb70b..9bb8499 100644 --- a/scripts/followlive.py +++ b/scripts/followlive.py @@ -19,7 +19,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import datetime
diff --git a/scripts/freebasemappingupload.py b/scripts/freebasemappingupload.py index 7f397bd..21a4af5 100755 --- a/scripts/freebasemappingupload.py +++ b/scripts/freebasemappingupload.py @@ -19,7 +19,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import gzip import os diff --git a/scripts/harvest_template.py b/scripts/harvest_template.py index 228a3e9..d8ffb78 100755 --- a/scripts/harvest_template.py +++ b/scripts/harvest_template.py @@ -82,7 +82,7 @@ # # Distributed under the terms of MIT License. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import signal
diff --git a/scripts/illustrate_wikidata.py b/scripts/illustrate_wikidata.py index 7c050b3..7fc95a0 100755 --- a/scripts/illustrate_wikidata.py +++ b/scripts/illustrate_wikidata.py @@ -19,7 +19,7 @@ # # Distributed under the terms of MIT License. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot
diff --git a/scripts/image.py b/scripts/image.py index 78368bb..374b821 100755 --- a/scripts/image.py +++ b/scripts/image.py @@ -42,7 +42,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import re
diff --git a/scripts/imagecopy.py b/scripts/imagecopy.py index 956da12..96d922b 100644 --- a/scripts/imagecopy.py +++ b/scripts/imagecopy.py @@ -68,7 +68,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import codecs import re diff --git a/scripts/imagecopy_self.py b/scripts/imagecopy_self.py index e630467..254bc55 100644 --- a/scripts/imagecopy_self.py +++ b/scripts/imagecopy_self.py @@ -48,7 +48,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import re import threading diff --git a/scripts/imageharvest.py b/scripts/imageharvest.py index 6e2bd5f..98b2226 100644 --- a/scripts/imageharvest.py +++ b/scripts/imageharvest.py @@ -21,7 +21,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import os
diff --git a/scripts/imagerecat.py b/scripts/imagerecat.py index be97bb6..d6996f9 100755 --- a/scripts/imagerecat.py +++ b/scripts/imagerecat.py @@ -31,7 +31,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import re import socket diff --git a/scripts/imagetransfer.py b/scripts/imagetransfer.py index 6f606df..f4d3e62 100755 --- a/scripts/imagetransfer.py +++ b/scripts/imagetransfer.py @@ -31,7 +31,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import re import sys diff --git a/scripts/imageuncat.py b/scripts/imageuncat.py index 46b8035..0967443 100755 --- a/scripts/imageuncat.py +++ b/scripts/imageuncat.py @@ -16,7 +16,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from datetime import timedelta
diff --git a/scripts/interwiki.py b/scripts/interwiki.py index 246d640..8d7a68c 100755 --- a/scripts/interwiki.py +++ b/scripts/interwiki.py @@ -346,7 +346,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import codecs from itertools import chain diff --git a/scripts/interwikidata.py b/scripts/interwikidata.py index 8e5a71c..e9e3958 100644 --- a/scripts/interwikidata.py +++ b/scripts/interwikidata.py @@ -27,7 +27,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import unicode_literals, absolute_import +from __future__ import unicode_literals, division, absolute_import
import pywikibot
diff --git a/scripts/isbn.py b/scripts/isbn.py index 4c8ab93..2191dee 100755 --- a/scripts/isbn.py +++ b/scripts/isbn.py @@ -39,7 +39,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import re
diff --git a/scripts/listpages.py b/scripts/listpages.py index bd95806..5767235 100755 --- a/scripts/listpages.py +++ b/scripts/listpages.py @@ -92,7 +92,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import os import re diff --git a/scripts/login.py b/scripts/login.py index 8e949b1..04f20ad 100755 --- a/scripts/login.py +++ b/scripts/login.py @@ -56,11 +56,11 @@ """ # # (C) Rob W.W. Hooft, 2003 -# (C) Pywikibot team, 2003-2017 +# (C) Pywikibot team, 2003-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from os.path import join
diff --git a/scripts/lonelypages.py b/scripts/lonelypages.py index 317f4e0..ad83725 100755 --- a/scripts/lonelypages.py +++ b/scripts/lonelypages.py @@ -38,7 +38,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import re import sys diff --git a/scripts/maintenance/cache.py b/scripts/maintenance/cache.py index 6eb9085..e3be450 100755 --- a/scripts/maintenance/cache.py +++ b/scripts/maintenance/cache.py @@ -63,7 +63,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import datetime import hashlib diff --git a/scripts/maintenance/colors.py b/scripts/maintenance/colors.py index b3258d5..7c5c558 100644 --- a/scripts/maintenance/colors.py +++ b/scripts/maintenance/colors.py @@ -2,11 +2,11 @@ # -*- coding: utf-8 -*- """Utility to show pywikibot colors.""" # -# (C) Pywikibot team, 2016 +# (C) Pywikibot team, 2016-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot
diff --git a/scripts/maintenance/compat2core.py b/scripts/maintenance/compat2core.py index 8ec31c7..cfc807d 100755 --- a/scripts/maintenance/compat2core.py +++ b/scripts/maintenance/compat2core.py @@ -31,7 +31,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import codecs import os diff --git a/scripts/maintenance/diff_checker.py b/scripts/maintenance/diff_checker.py index 59d12b8..608f501 100644 --- a/scripts/maintenance/diff_checker.py +++ b/scripts/maintenance/diff_checker.py @@ -22,7 +22,7 @@ # Distributed under the terms of the MIT license. #
-from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from re import compile as re_compile, IGNORECASE from subprocess import check_output diff --git a/scripts/maintenance/make_i18n_dict.py b/scripts/maintenance/make_i18n_dict.py index f735109..bdad8db 100755 --- a/scripts/maintenance/make_i18n_dict.py +++ b/scripts/maintenance/make_i18n_dict.py @@ -34,7 +34,8 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, print_function, unicode_literals +from __future__ import (absolute_import, division, + print_function, unicode_literals)
import codecs import json diff --git a/scripts/maintenance/wikimedia_sites.py b/scripts/maintenance/wikimedia_sites.py index ebda5c7..493a1c6 100755 --- a/scripts/maintenance/wikimedia_sites.py +++ b/scripts/maintenance/wikimedia_sites.py @@ -13,7 +13,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import codecs import re diff --git a/scripts/makecat.py b/scripts/makecat.py index 2ed0f0e..bb3f43f 100755 --- a/scripts/makecat.py +++ b/scripts/makecat.py @@ -46,7 +46,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import codecs
diff --git a/scripts/misspelling.py b/scripts/misspelling.py index b825999..1add235 100755 --- a/scripts/misspelling.py +++ b/scripts/misspelling.py @@ -26,7 +26,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from itertools import chain
diff --git a/scripts/movepages.py b/scripts/movepages.py index 6630f3d..9866c7a 100755 --- a/scripts/movepages.py +++ b/scripts/movepages.py @@ -38,7 +38,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import re
diff --git a/scripts/ndashredir.py b/scripts/ndashredir.py index 29eb67a..86dd098 100644 --- a/scripts/ndashredir.py +++ b/scripts/ndashredir.py @@ -31,7 +31,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot from pywikibot import i18n, pagegenerators diff --git a/scripts/newitem.py b/scripts/newitem.py index 937910a..aab642f 100755 --- a/scripts/newitem.py +++ b/scripts/newitem.py @@ -20,11 +20,11 @@ """ # # (C) Multichill, 2014 -# (C) Pywikibot team, 2014-2017 +# (C) Pywikibot team, 2014-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from datetime import timedelta
diff --git a/scripts/noreferences.py b/scripts/noreferences.py index b2964c1..5136d4a 100755 --- a/scripts/noreferences.py +++ b/scripts/noreferences.py @@ -38,7 +38,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import re
diff --git a/scripts/nowcommons.py b/scripts/nowcommons.py index 6a3f431..0587af0 100755 --- a/scripts/nowcommons.py +++ b/scripts/nowcommons.py @@ -53,7 +53,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from itertools import chain import sys diff --git a/scripts/pagefromfile.py b/scripts/pagefromfile.py index 21d41ae..09b7f8e 100755 --- a/scripts/pagefromfile.py +++ b/scripts/pagefromfile.py @@ -66,7 +66,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import codecs import os diff --git a/scripts/patrol.py b/scripts/patrol.py index 3f60734..3c0e8a0 100755 --- a/scripts/patrol.py +++ b/scripts/patrol.py @@ -51,7 +51,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import time
diff --git a/scripts/piper.py b/scripts/piper.py index bfc162f..97898ea 100755 --- a/scripts/piper.py +++ b/scripts/piper.py @@ -33,7 +33,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import os import pipes diff --git a/scripts/protect.py b/scripts/protect.py index 1aa5d5a..e8e0f8a 100755 --- a/scripts/protect.py +++ b/scripts/protect.py @@ -57,7 +57,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot from pywikibot import i18n, pagegenerators diff --git a/scripts/redirect.py b/scripts/redirect.py index dff042e..78d7be1 100755 --- a/scripts/redirect.py +++ b/scripts/redirect.py @@ -77,7 +77,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import datetime import sys diff --git a/scripts/replace.py b/scripts/replace.py index 00fb7bb..f36d6d2 100755 --- a/scripts/replace.py +++ b/scripts/replace.py @@ -141,7 +141,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import codecs try: diff --git a/scripts/replicate_wiki.py b/scripts/replicate_wiki.py index fe486f0..a4d75dd 100755 --- a/scripts/replicate_wiki.py +++ b/scripts/replicate_wiki.py @@ -44,7 +44,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import sys
diff --git a/scripts/revertbot.py b/scripts/revertbot.py index ddcea48..f6c4e07 100755 --- a/scripts/revertbot.py +++ b/scripts/revertbot.py @@ -43,7 +43,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot from pywikibot import i18n diff --git a/scripts/script_wui.py b/scripts/script_wui.py index 40c4d10..36f2493 100755 --- a/scripts/script_wui.py +++ b/scripts/script_wui.py @@ -60,7 +60,7 @@ # ... # --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import datetime import gc diff --git a/scripts/selflink.py b/scripts/selflink.py index 4c08e6a..03c3ebb 100755 --- a/scripts/selflink.py +++ b/scripts/selflink.py @@ -15,7 +15,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot
diff --git a/scripts/shell.py b/scripts/shell.py index 5333556..be01d95 100755 --- a/scripts/shell.py +++ b/scripts/shell.py @@ -18,7 +18,8 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, print_function, unicode_literals +from __future__ import (absolute_import, division, + print_function, unicode_literals)
import code import sys diff --git a/scripts/solve_disambiguation.py b/scripts/solve_disambiguation.py index 823f513..8bea920 100755 --- a/scripts/solve_disambiguation.py +++ b/scripts/solve_disambiguation.py @@ -84,7 +84,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import codecs from itertools import chain diff --git a/scripts/spamremove.py b/scripts/spamremove.py index db76bd3..c9d48cf 100755 --- a/scripts/spamremove.py +++ b/scripts/spamremove.py @@ -31,7 +31,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot
diff --git a/scripts/standardize_interwiki.py b/scripts/standardize_interwiki.py index 6ddc280..cad11b3 100644 --- a/scripts/standardize_interwiki.py +++ b/scripts/standardize_interwiki.py @@ -13,7 +13,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot
diff --git a/scripts/states_redirect.py b/scripts/states_redirect.py index 2cc6012..1701b6d 100755 --- a/scripts/states_redirect.py +++ b/scripts/states_redirect.py @@ -19,7 +19,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import re import sys diff --git a/scripts/surnames_redirects.py b/scripts/surnames_redirects.py index 635815f..5ea2abd 100755 --- a/scripts/surnames_redirects.py +++ b/scripts/surnames_redirects.py @@ -20,7 +20,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from difflib import SequenceMatcher
diff --git a/scripts/table2wiki.py b/scripts/table2wiki.py index cb66d7d..2dc8c0f 100644 --- a/scripts/table2wiki.py +++ b/scripts/table2wiki.py @@ -46,7 +46,7 @@ # # Automatically ported from compat branch by compat2core.py script # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import re
diff --git a/scripts/template.py b/scripts/template.py index b9f546c..14741e0 100755 --- a/scripts/template.py +++ b/scripts/template.py @@ -112,7 +112,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from itertools import chain import re diff --git a/scripts/templatecount.py b/scripts/templatecount.py index adc0896..8a79cc9 100755 --- a/scripts/templatecount.py +++ b/scripts/templatecount.py @@ -32,12 +32,12 @@
""" # -# (C) Pywikibot team, 2006-2017 -# (C) xqt, 2009-2016 +# (C) Pywikibot team, 2006-2018 +# (C) xqt, 2009-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import datetime
diff --git a/scripts/touch.py b/scripts/touch.py index 732f56b..0e1883b 100755 --- a/scripts/touch.py +++ b/scripts/touch.py @@ -15,11 +15,11 @@
""" # -# (C) Pywikibot team, 2009-2017 +# (C) Pywikibot team, 2009-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot
diff --git a/scripts/transferbot.py b/scripts/transferbot.py index c0b0d8e..cd0a256 100755 --- a/scripts/transferbot.py +++ b/scripts/transferbot.py @@ -41,7 +41,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot from pywikibot import pagegenerators diff --git a/scripts/unlink.py b/scripts/unlink.py index 89097a4..ed80c0d 100755 --- a/scripts/unlink.py +++ b/scripts/unlink.py @@ -21,11 +21,11 @@ descriptions. """ # -# (C) Pywikibot team, 2007-2017 +# (C) Pywikibot team, 2007-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot from pywikibot.bot import SingleSiteBot diff --git a/scripts/unusedfiles.py b/scripts/unusedfiles.py index cad7df0..6d30234 100755 --- a/scripts/unusedfiles.py +++ b/scripts/unusedfiles.py @@ -19,7 +19,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot from pywikibot import i18n, pagegenerators, Bot diff --git a/scripts/upload.py b/scripts/upload.py index 5faf354..c9a44c1 100755 --- a/scripts/upload.py +++ b/scripts/upload.py @@ -56,7 +56,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import codecs import math diff --git a/scripts/version.py b/scripts/version.py index 8819bc3..4ce9170 100755 --- a/scripts/version.py +++ b/scripts/version.py @@ -8,7 +8,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import codecs import os diff --git a/scripts/watchlist.py b/scripts/watchlist.py index 206d21b..3418626 100755 --- a/scripts/watchlist.py +++ b/scripts/watchlist.py @@ -22,7 +22,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import os
diff --git a/scripts/weblinkchecker.py b/scripts/weblinkchecker.py index 0a232c6..a46fe34 100755 --- a/scripts/weblinkchecker.py +++ b/scripts/weblinkchecker.py @@ -103,7 +103,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import codecs import datetime diff --git a/scripts/welcome.py b/scripts/welcome.py index 17419b4..0934819 100755 --- a/scripts/welcome.py +++ b/scripts/welcome.py @@ -165,7 +165,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import codecs from datetime import timedelta diff --git a/scripts/wikisourcetext.py b/scripts/wikisourcetext.py index 8286604..4e2151f 100644 --- a/scripts/wikisourcetext.py +++ b/scripts/wikisourcetext.py @@ -50,7 +50,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import itertools
diff --git a/setup.py b/setup.py index 4494d88..1148044 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,8 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, print_function, unicode_literals +from __future__ import (absolute_import, division, + print_function, unicode_literals)
import os import sys diff --git a/tests/__init__.py b/tests/__init__.py index 16af996..49c3b00 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -5,7 +5,8 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, print_function, unicode_literals +from __future__ import (absolute_import, division, + print_function, unicode_literals)
__all__ = ( 'requests', 'unittest', 'TestRequest', 'patch_request', 'unpatch_request', diff --git a/tests/add_text_tests.py b/tests/add_text_tests.py index 8b1efb2..df6223e 100644 --- a/tests/add_text_tests.py +++ b/tests/add_text_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot
diff --git a/tests/api_tests.py b/tests/api_tests.py index 0088f09..5aa5f49 100644 --- a/tests/api_tests.py +++ b/tests/api_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from collections import defaultdict import datetime diff --git a/tests/archivebot_tests.py b/tests/archivebot_tests.py index 4b60636..7d292d9 100644 --- a/tests/archivebot_tests.py +++ b/tests/archivebot_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from datetime import datetime, timedelta
diff --git a/tests/aspects.py b/tests/aspects.py index 331d633..a2a2e8c 100644 --- a/tests/aspects.py +++ b/tests/aspects.py @@ -11,7 +11,8 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, print_function, unicode_literals +from __future__ import (absolute_import, division, + print_function, unicode_literals) import inspect import itertools import os diff --git a/tests/basepage_tests.py b/tests/basepage_tests.py index 58bbde9..e186ab5 100644 --- a/tests/basepage_tests.py +++ b/tests/basepage_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot.page import BasePage
diff --git a/tests/bot_tests.py b/tests/bot_tests.py index 5ca63f1..6d47d22 100644 --- a/tests/bot_tests.py +++ b/tests/bot_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import sys
diff --git a/tests/cache_tests.py b/tests/cache_tests.py index baf2d2d..526347c 100644 --- a/tests/cache_tests.py +++ b/tests/cache_tests.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """API Request cache tests.""" # -# (C) Pywikibot team, 2012-2015 +# (C) Pywikibot team, 2012-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot.site import BaseSite
diff --git a/tests/category_bot_tests.py b/tests/category_bot_tests.py index 680e4e7..84e67b5 100644 --- a/tests/category_bot_tests.py +++ b/tests/category_bot_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot from pywikibot import BaseSite diff --git a/tests/category_tests.py b/tests/category_tests.py index 9fe5659..222fe13 100644 --- a/tests/category_tests.py +++ b/tests/category_tests.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Tests for the Category class.""" # -# (C) Pywikibot team, 2014-2017 +# (C) Pywikibot team, 2014-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot import pywikibot.page diff --git a/tests/checkimages_tests.py b/tests/checkimages_tests.py index cfdd2dc..12dd85f 100644 --- a/tests/checkimages_tests.py +++ b/tests/checkimages_tests.py @@ -2,11 +2,11 @@ # -*- coding: utf-8 -*- """Unit tests for checkimages script.""" # -# (C) Pywikibot team, 2015-2016 +# (C) Pywikibot team, 2015-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from scripts import checkimages
diff --git a/tests/conftest.py b/tests/conftest.py index 3f956bc..0af46cf 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Used by pytest to do some preparation work before running tests.""" # -# (C) Pywikibot team, 2016-2017 +# (C) Pywikibot team, 2016-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import sys
diff --git a/tests/cosmetic_changes_tests.py b/tests/cosmetic_changes_tests.py index a6024a2..f038733 100644 --- a/tests/cosmetic_changes_tests.py +++ b/tests/cosmetic_changes_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot.cosmetic_changes import CosmeticChangesToolkit
diff --git a/tests/data/fixes.py b/tests/data/fixes.py index 5220e35..3f04424 100644 --- a/tests/data/fixes.py +++ b/tests/data/fixes.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Collection of fixes for tests.""" # -# (C) Pywikibot team, 2015 +# (C) Pywikibot team, 2015-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
# flake8 cannot detect that fixes is defined via pywikibot.fixes if 'fixes' not in globals(): diff --git a/tests/data/set-fixes.py b/tests/data/set-fixes.py index 0f3bbee..3911506 100644 --- a/tests/data/set-fixes.py +++ b/tests/data/set-fixes.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Fixes implementation which overwrites the variable.""" # -# (C) Pywikibot team, 2015 +# (C) Pywikibot team, 2015-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
# Just kill the old value suffices fixes = {} diff --git a/tests/data_ingestion_tests.py b/tests/data_ingestion_tests.py index bbf9234..dbce145 100644 --- a/tests/data_ingestion_tests.py +++ b/tests/data_ingestion_tests.py @@ -2,11 +2,11 @@ # -*- coding: utf-8 -*- """Unit tests for data_ingestion.py script.""" # -# (C) Pywikibot team, 2012-2016 +# (C) Pywikibot team, 2012-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from scripts import data_ingestion
diff --git a/tests/date_tests.py b/tests/date_tests.py index 672649b..80abd68 100644 --- a/tests/date_tests.py +++ b/tests/date_tests.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Tests for the date module.""" # -# (C) Pywikibot team, 2012-2015 +# (C) Pywikibot team, 2012-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from datetime import datetime
diff --git a/tests/deletionbot_tests.py b/tests/deletionbot_tests.py index e4475f9..6fcd981 100644 --- a/tests/deletionbot_tests.py +++ b/tests/deletionbot_tests.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Tests for scripts/delete.py.""" # -# (C) Pywikibot team, 2014-2016 +# (C) Pywikibot team, 2014-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot import pywikibot.page diff --git a/tests/deprecation_tests.py b/tests/deprecation_tests.py index 3cbb7aa..569f233c 100644 --- a/tests/deprecation_tests.py +++ b/tests/deprecation_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot.tools import ( deprecated, deprecate_arg, deprecated_args, add_full_name, remove_last_args diff --git a/tests/diff_tests.py b/tests/diff_tests.py index 27a1028..2d49d52 100644 --- a/tests/diff_tests.py +++ b/tests/diff_tests.py @@ -2,10 +2,10 @@ # -*- coding: utf-8 -*- """Test diff module.""" # -# (C) Pywikibot team, 2016-2017 +# (C) Pywikibot team, 2016-2018 # # Distributed under the terms of the MIT license. -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot.diff import cherry_pick, html_comparator, PatchManager from pywikibot.tools import PY2 diff --git a/tests/disambredir_tests.py b/tests/disambredir_tests.py index 4a8af06..86b7a95 100644 --- a/tests/disambredir_tests.py +++ b/tests/disambredir_tests.py @@ -9,7 +9,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot
diff --git a/tests/djvu_tests.py b/tests/djvu_tests.py index f2dd79f..ea9b010 100644 --- a/tests/djvu_tests.py +++ b/tests/djvu_tests.py @@ -3,12 +3,12 @@ """Unit tests for djvu.py."""
# -# (C) Pywikibot team, 2015-2017 +# (C) Pywikibot team, 2015-2018 # # Distributed under the terms of the MIT license. #
-from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import os import subprocess diff --git a/tests/dry_api_tests.py b/tests/dry_api_tests.py index b0ec916..d5056ec 100644 --- a/tests/dry_api_tests.py +++ b/tests/dry_api_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import datetime
diff --git a/tests/dry_site_tests.py b/tests/dry_site_tests.py index 18a98a9..c67435c 100644 --- a/tests/dry_site_tests.py +++ b/tests/dry_site_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot from pywikibot.tools import deprecated diff --git a/tests/edit_failure_tests.py b/tests/edit_failure_tests.py index 7ec8988..f665f4a 100644 --- a/tests/edit_failure_tests.py +++ b/tests/edit_failure_tests.py @@ -12,7 +12,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot from pywikibot import ( diff --git a/tests/edit_tests.py b/tests/edit_tests.py index 0c7206f..0b1fed8 100644 --- a/tests/edit_tests.py +++ b/tests/edit_tests.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Tests for editing pages.""" # -# (C) Pywikibot team, 2015-2017 +# (C) Pywikibot team, 2015-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import time
diff --git a/tests/eventstreams_tests.py b/tests/eventstreams_tests.py index a033dc0..0d88bc3 100644 --- a/tests/eventstreams_tests.py +++ b/tests/eventstreams_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from tests import mock
diff --git a/tests/exceptions_tests.py b/tests/exceptions_tests.py index 5681101..b205f38 100644 --- a/tests/exceptions_tests.py +++ b/tests/exceptions_tests.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Tests for exceptions.""" # -# (C) Pywikibot team, 2014-2015 +# (C) Pywikibot team, 2014-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot
diff --git a/tests/family_tests.py b/tests/family_tests.py index 4ce790e..560faf7 100644 --- a/tests/family_tests.py +++ b/tests/family_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot.site
diff --git a/tests/file_tests.py b/tests/file_tests.py index bc675db..c187654 100644 --- a/tests/file_tests.py +++ b/tests/file_tests.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """FilePage tests.""" # -# (C) Pywikibot team, 2014-2017 +# (C) Pywikibot team, 2014-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import os import re diff --git a/tests/fixes_tests.py b/tests/fixes_tests.py index ea694f1..84008b1 100644 --- a/tests/fixes_tests.py +++ b/tests/fixes_tests.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Tests for fixes module.""" # -# (C) Pywikibot team, 2015 +# (C) Pywikibot team, 2015-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import fixes
diff --git a/tests/fixing_redirects_tests.py b/tests/fixing_redirects_tests.py index 86c985f..10239ba 100644 --- a/tests/fixing_redirects_tests.py +++ b/tests/fixing_redirects_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot
diff --git a/tests/flow_edit_tests.py b/tests/flow_edit_tests.py index c8d346c..d486ee0 100644 --- a/tests/flow_edit_tests.py +++ b/tests/flow_edit_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot.exceptions import LockedPage from pywikibot.flow import Board, Topic, Post diff --git a/tests/flow_tests.py b/tests/flow_tests.py index f5dd438..2c8ddb3 100644 --- a/tests/flow_tests.py +++ b/tests/flow_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot.exceptions import NoPage from pywikibot.flow import Board, Topic, Post diff --git a/tests/flow_thanks_tests.py b/tests/flow_thanks_tests.py index 8fadb67..7eb86ca 100644 --- a/tests/flow_thanks_tests.py +++ b/tests/flow_thanks_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot.flow import Topic
diff --git a/tests/generate_family_files_tests.py b/tests/generate_family_files_tests.py index ce3b7f3..2c9ba7c 100644 --- a/tests/generate_family_files_tests.py +++ b/tests/generate_family_files_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from random import choice
diff --git a/tests/generate_user_files_tests.py b/tests/generate_user_files_tests.py index f8c4750..f0625cb 100644 --- a/tests/generate_user_files_tests.py +++ b/tests/generate_user_files_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import re
diff --git a/tests/http_tests.py b/tests/http_tests.py index 2264e2b..bb3d3e0 100644 --- a/tests/http_tests.py +++ b/tests/http_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import json import re diff --git a/tests/i18n/pywikibot.py b/tests/i18n/pywikibot.py index 2b081f3..5261a7f 100644 --- a/tests/i18n/pywikibot.py +++ b/tests/i18n/pywikibot.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """i18n message bundle called 'pywikibot' to fool the i18n loader.""" # -# (C) Pywikibot team, 2014-2015 +# (C) Pywikibot team, 2014-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
msg = {} diff --git a/tests/i18n_tests.py b/tests/i18n_tests.py index 6454bb8..a68ddc6 100644 --- a/tests/i18n_tests.py +++ b/tests/i18n_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot
diff --git a/tests/imagecopy_tests.py b/tests/imagecopy_tests.py index d6c38ce..f09f004 100644 --- a/tests/imagecopy_tests.py +++ b/tests/imagecopy_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import re
diff --git a/tests/interwiki_graph_tests.py b/tests/interwiki_graph_tests.py index cb42311..07f5fa9 100644 --- a/tests/interwiki_graph_tests.py +++ b/tests/interwiki_graph_tests.py @@ -6,7 +6,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import interwiki_graph
diff --git a/tests/interwiki_link_tests.py b/tests/interwiki_link_tests.py index d540955..acd2a49 100644 --- a/tests/interwiki_link_tests.py +++ b/tests/interwiki_link_tests.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Test Interwiki Link functionality.""" # -# (C) Pywikibot team, 2014-2015 +# (C) Pywikibot team, 2014-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import config2 as config
diff --git a/tests/interwikidata_tests.py b/tests/interwikidata_tests.py index bd03326..dd682a2 100644 --- a/tests/interwikidata_tests.py +++ b/tests/interwikidata_tests.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Tests for scripts/interwikidata.py.""" # -# (C) Pywikibot team, 2015-2017 +# (C) Pywikibot team, 2015-2018 # # Distributed under the terms of the MIT license. # -from __future__ import unicode_literals, absolute_import +from __future__ import absolute_import, division, unicode_literals
import pywikibot
diff --git a/tests/isbn_tests.py b/tests/isbn_tests.py index 5bb57b9..82c01ce 100644 --- a/tests/isbn_tests.py +++ b/tests/isbn_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot
diff --git a/tests/l10n_tests.py b/tests/l10n_tests.py index 395f420..316a161 100644 --- a/tests/l10n_tests.py +++ b/tests/l10n_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot from pywikibot import i18n diff --git a/tests/link_tests.py b/tests/link_tests.py index 0fcfcc3..1e7cc72 100644 --- a/tests/link_tests.py +++ b/tests/link_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import re
diff --git a/tests/logentry_tests.py b/tests/logentry_tests.py index 559cb2f..b163211 100644 --- a/tests/logentry_tests.py +++ b/tests/logentry_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import datetime
diff --git a/tests/login_tests.py b/tests/login_tests.py index 567c7a8..d46f1b9 100644 --- a/tests/login_tests.py +++ b/tests/login_tests.py @@ -5,11 +5,11 @@ e.g. used to test password-file based login. """ # -# (C) Pywikibot team, 2012-2017 +# (C) Pywikibot team, 2012-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from collections import defaultdict from io import StringIO diff --git a/tests/mediawikiversion_tests.py b/tests/mediawikiversion_tests.py index b819a21..1d8cecc 100644 --- a/tests/mediawikiversion_tests.py +++ b/tests/mediawikiversion_tests.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Tests for the tools.MediaWikiVersion class.""" # -# (C) Pywikibot team, 2008-2017 +# (C) Pywikibot team, 2008-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot.tools import MediaWikiVersion diff --git a/tests/namespace_tests.py b/tests/namespace_tests.py index edf39aa..11904e9 100644 --- a/tests/namespace_tests.py +++ b/tests/namespace_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
try: from collections.abc import Iterable diff --git a/tests/noreferences_tests.py b/tests/noreferences_tests.py index 5439111..e3c9f5b 100644 --- a/tests/noreferences_tests.py +++ b/tests/noreferences_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot
diff --git a/tests/oauth_tests.py b/tests/oauth_tests.py index cd211a2..f889a0b 100644 --- a/tests/oauth_tests.py +++ b/tests/oauth_tests.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Test OAuth functionality.""" # -# (C) Pywikibot team, 2015 +# (C) Pywikibot team, 2015-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import os
diff --git a/tests/page_tests.py b/tests/page_tests.py index bed1cc8..f2f3b14 100644 --- a/tests/page_tests.py +++ b/tests/page_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pickle diff --git a/tests/pagegenerators_tests.py b/tests/pagegenerators_tests.py index 4c6de1d..fa4aab2 100755 --- a/tests/pagegenerators_tests.py +++ b/tests/pagegenerators_tests.py @@ -5,7 +5,7 @@ # (C) Pywikibot team, 2009-2018 # # Distributed under the terms of the MIT license. -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import calendar import datetime diff --git a/tests/paraminfo_tests.py b/tests/paraminfo_tests.py index 4c6f757..bf7fe8d 100644 --- a/tests/paraminfo_tests.py +++ b/tests/paraminfo_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import config from pywikibot.family import WikimediaFamily diff --git a/tests/patrolbot_tests.py b/tests/patrolbot_tests.py index ad91911..1f9fca1 100644 --- a/tests/patrolbot_tests.py +++ b/tests/patrolbot_tests.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Tests for the patrol script.""" # -# (C) Pywikibot team, 2015 +# (C) Pywikibot team, 2015-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
try: diff --git a/tests/plural_tests.py b/tests/plural_tests.py index 62a9ec0..dff2a7f 100644 --- a/tests/plural_tests.py +++ b/tests/plural_tests.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Test plural module.""" # -# (C) Pywikibot team, 2015 +# (C) Pywikibot team, 2015-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import plural
diff --git a/tests/proofreadpage_tests.py b/tests/proofreadpage_tests.py index a381dcd..ff8fe3b 100644 --- a/tests/proofreadpage_tests.py +++ b/tests/proofreadpage_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import json
diff --git a/tests/protectbot_tests.py b/tests/protectbot_tests.py index 7b8a34d..94aea91 100644 --- a/tests/protectbot_tests.py +++ b/tests/protectbot_tests.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Tests for scripts/protect.py.""" # -# (C) Pywikibot team, 2014-2015 +# (C) Pywikibot team, 2014-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot import pywikibot.page diff --git a/tests/pwb/print_env.py b/tests/pwb/print_env.py index 1377c14..6f4d4c7 100644 --- a/tests/pwb/print_env.py +++ b/tests/pwb/print_env.py @@ -6,7 +6,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import os import sys diff --git a/tests/pwb/print_locals.py b/tests/pwb/print_locals.py index e9d08d4..5b6b2df 100644 --- a/tests/pwb/print_locals.py +++ b/tests/pwb/print_locals.py @@ -6,7 +6,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import os.path
diff --git a/tests/pwb/print_unicode.py b/tests/pwb/print_unicode.py index c02f028..cacccbc 100644 --- a/tests/pwb/print_unicode.py +++ b/tests/pwb/print_unicode.py @@ -6,7 +6,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot
diff --git a/tests/pwb_tests.py b/tests/pwb_tests.py index 76f977e..7e3f76d 100644 --- a/tests/pwb_tests.py +++ b/tests/pwb_tests.py @@ -7,11 +7,11 @@ https://bitbucket.org/ned/coveragepy/src/default/tests/test_execfile.py """ # -# (C) Pywikibot team, 2007-2015 +# (C) Pywikibot team, 2007-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import sys
diff --git a/tests/python_tests.py b/tests/python_tests.py index 1ed6366..5100768 100755 --- a/tests/python_tests.py +++ b/tests/python_tests.py @@ -5,7 +5,7 @@ # (C) Pywikibot team, 2015-2018 # # Distributed under the terms of the MIT license. -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import unicodedata
diff --git a/tests/redirect_bot_tests.py b/tests/redirect_bot_tests.py index 9fcc176..9072205 100644 --- a/tests/redirect_bot_tests.py +++ b/tests/redirect_bot_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot from pywikibot import site, Page, i18n diff --git a/tests/reflinks_tests.py b/tests/reflinks_tests.py index 4deea1c..15a258f 100644 --- a/tests/reflinks_tests.py +++ b/tests/reflinks_tests.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Tests for reflinks script.""" # -# (C) Pywikibot team, 2014-2015 +# (C) Pywikibot team, 2014-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from scripts.reflinks import XmlDumpPageGenerator, ReferencesRobot, main
diff --git a/tests/replacebot_tests.py b/tests/replacebot_tests.py index eb67f37..86502c3 100644 --- a/tests/replacebot_tests.py +++ b/tests/replacebot_tests.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Tests for the replace script and ReplaceRobot class.""" # -# (C) Pywikibot team, 2015 +# (C) Pywikibot team, 2015-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot
diff --git a/tests/script_tests.py b/tests/script_tests.py index dbbdc98..5e821a6 100644 --- a/tests/script_tests.py +++ b/tests/script_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, print_function, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import os import sys diff --git a/tests/site_detect_tests.py b/tests/site_detect_tests.py index 956e48a..bdf0d47 100644 --- a/tests/site_detect_tests.py +++ b/tests/site_detect_tests.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- """Test for site detection.""" # -# (C) Pywikibot team, 2014-2017 +# (C) Pywikibot team, 2014-2018 # # Distributed under the terms of the MIT license. #
-from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from requests.exceptions import ConnectionError, Timeout
diff --git a/tests/site_tests.py b/tests/site_tests.py index d676b11..c875938 100644 --- a/tests/site_tests.py +++ b/tests/site_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import os import pickle diff --git a/tests/sparql_tests.py b/tests/sparql_tests.py index 44b346b..c3440dd 100644 --- a/tests/sparql_tests.py +++ b/tests/sparql_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot.data.sparql as sparql from pywikibot.tools import UnicodeType diff --git a/tests/template_bot_tests.py b/tests/template_bot_tests.py index d036b53..d6d1d5d 100644 --- a/tests/template_bot_tests.py +++ b/tests/template_bot_tests.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Test template bot module.""" # -# (C) Pywikibot team, 2015-2016 +# (C) Pywikibot team, 2015-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot
diff --git a/tests/tests_tests.py b/tests/tests_tests.py index 97dd2f8..39232c9 100755 --- a/tests/tests_tests.py +++ b/tests/tests_tests.py @@ -2,10 +2,10 @@ # -*- coding: utf-8 -*- """Tests for the tests package.""" # -# (C) Pywikibot team, 2014-2015 +# (C) Pywikibot team, 2014-2018 # # Distributed under the terms of the MIT license. -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot
diff --git a/tests/textlib_tests.py b/tests/textlib_tests.py index 0e56cc8..985383c 100644 --- a/tests/textlib_tests.py +++ b/tests/textlib_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import codecs from collections import OrderedDict diff --git a/tests/thanks_tests.py b/tests/thanks_tests.py index 9e5decc..8099d83 100644 --- a/tests/thanks_tests.py +++ b/tests/thanks_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot.page import Page, Revision, User
diff --git a/tests/thread_tests.py b/tests/thread_tests.py index d794058..2aef920 100644 --- a/tests/thread_tests.py +++ b/tests/thread_tests.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Tests for threading tools.""" # -# (C) Pywikibot team, 2014-2015 +# (C) Pywikibot team, 2014-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from tests.aspects import unittest, TestCase
diff --git a/tests/timestamp_tests.py b/tests/timestamp_tests.py index 8ddb8a1..022a975 100644 --- a/tests/timestamp_tests.py +++ b/tests/timestamp_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import calendar import datetime diff --git a/tests/timestripper_tests.py b/tests/timestripper_tests.py index 321d360..42000ee 100644 --- a/tests/timestripper_tests.py +++ b/tests/timestripper_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import datetime import re diff --git a/tests/tk_tests.py b/tests/tk_tests.py index be2ad20..a47f486 100644 --- a/tests/tk_tests.py +++ b/tests/tk_tests.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Tests for the Tk UI.""" # -# (C) Pywikibot team, 2008-2015 +# (C) Pywikibot team, 2008-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import os
diff --git a/tests/tools_chars_tests.py b/tests/tools_chars_tests.py index dd90b95..72ee4f9 100644 --- a/tests/tools_chars_tests.py +++ b/tests/tools_chars_tests.py @@ -2,10 +2,10 @@ # -*- coding: utf-8 -*- """Test tools.chars package.""" # -# (C) Pywikibot team, 2015 +# (C) Pywikibot team, 2015-2018 # # Distributed under the terms of the MIT license. -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import unicodedata
diff --git a/tests/tools_formatter_tests.py b/tests/tools_formatter_tests.py index 34a187d..37fb026 100644 --- a/tests/tools_formatter_tests.py +++ b/tests/tools_formatter_tests.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Tests for the C{pywikibot.tools.formatter} module.""" # -# (C) Pywikibot team, 2015 +# (C) Pywikibot team, 2015-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot.tools import formatter from pywikibot.tools import UnicodeMixin diff --git a/tests/tools_ip_tests.py b/tests/tools_ip_tests.py index 9820407..e533501 100644 --- a/tests/tools_ip_tests.py +++ b/tests/tools_ip_tests.py @@ -5,7 +5,7 @@ # (C) Pywikibot team, 2012-2018 # # Distributed under the terms of the MIT license. -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from distutils.version import StrictVersion
diff --git a/tests/tools_tests.py b/tests/tools_tests.py index d9e98ba..58c7ae3 100644 --- a/tests/tools_tests.py +++ b/tests/tools_tests.py @@ -5,7 +5,7 @@ # (C) Pywikibot team, 2015-2018 # # Distributed under the terms of the MIT license. -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
try: from collections.abc import Mapping diff --git a/tests/ui_options_tests.py b/tests/ui_options_tests.py index 7fa27f3..eb49d69 100644 --- a/tests/ui_options_tests.py +++ b/tests/ui_options_tests.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Bot tests for input_choice options.""" # -# (C) Pywikibot team, 2015-2017 +# (C) Pywikibot team, 2015-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import bot, bot_choice
diff --git a/tests/ui_tests.py b/tests/ui_tests.py index 9576edc..5c853c9 100644 --- a/tests/ui_tests.py +++ b/tests/ui_tests.py @@ -24,7 +24,7 @@ # easy_install --upgrade https://pywinauto.googlecode.com/files/pywinauto-0.4.2.zip # # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import inspect import io diff --git a/tests/upload_tests.py b/tests/upload_tests.py index b9e750d..632c836 100644 --- a/tests/upload_tests.py +++ b/tests/upload_tests.py @@ -5,11 +5,11 @@ These tests write to the wiki. """ # -# (C) Pywikibot team, 2014-2015 +# (C) Pywikibot team, 2014-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot
diff --git a/tests/uploadbot_tests.py b/tests/uploadbot_tests.py index 7ee7fc0..7b6ebde 100644 --- a/tests/uploadbot_tests.py +++ b/tests/uploadbot_tests.py @@ -5,11 +5,11 @@ These tests write to the wiki. """ # -# (C) Pywikibot team, 2014-2015 +# (C) Pywikibot team, 2014-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import os
diff --git a/tests/user_tests.py b/tests/user_tests.py index aed04a4..b0732be 100644 --- a/tests/user_tests.py +++ b/tests/user_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import pywikibot
diff --git a/tests/utils.py b/tests/utils.py index 3fe952e..84ce7bf 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import inspect import json diff --git a/tests/weblib_tests.py b/tests/weblib_tests.py index 6cba091..a16e441 100644 --- a/tests/weblib_tests.py +++ b/tests/weblib_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from requests.exceptions import ConnectionError as RequestsConnectionError
diff --git a/tests/weblinkchecker_tests.py b/tests/weblinkchecker_tests.py index f5d05d9..8052d63 100644 --- a/tests/weblinkchecker_tests.py +++ b/tests/weblinkchecker_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import datetime
diff --git a/tests/wikibase_edit_tests.py b/tests/wikibase_edit_tests.py index 63dee40..3f1cf59 100644 --- a/tests/wikibase_edit_tests.py +++ b/tests/wikibase_edit_tests.py @@ -6,11 +6,11 @@ class in edit_failiure_tests.py """ # -# (C) Pywikibot team, 2014-2017 +# (C) Pywikibot team, 2014-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import time
diff --git a/tests/wikibase_tests.py b/tests/wikibase_tests.py index 04a4332..688ed20 100644 --- a/tests/wikibase_tests.py +++ b/tests/wikibase_tests.py @@ -5,7 +5,7 @@ # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import copy import json diff --git a/tests/wikistats_tests.py b/tests/wikistats_tests.py index 42371bc..1d034f2 100644 --- a/tests/wikistats_tests.py +++ b/tests/wikistats_tests.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Test cases for the WikiStats dataset.""" # -# (C) Pywikibot team, 2014-2017 +# (C) Pywikibot team, 2014-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
import sys
diff --git a/tests/xmlreader_tests.py b/tests/xmlreader_tests.py index d963a38..ade20c9 100644 --- a/tests/xmlreader_tests.py +++ b/tests/xmlreader_tests.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- """Tests for xmlreader module.""" # -# (C) Pywikibot team, 2009-2015 +# (C) Pywikibot team, 2009-2018 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, division, unicode_literals
from pywikibot import xmlreader
diff --git a/tox.ini b/tox.ini index 599af03..d4c61c5 100644 --- a/tox.ini +++ b/tox.ini @@ -124,7 +124,7 @@ # The following are intentionally ignored, possibly pending consensus # D105: Missing docstring in magic method # D211: No blank lines allowed before class docstring -# FI10,FI12,FI13,FI15: __future__ import "division", "with_statement", "print_function" and "generator_stop" missing +# FI12,FI13,FI15: __future__ import "with_statement", "print_function" and "generator_stop" missing # FI5: __future__ import "x" present # H101: TODO format # H236: Mandatory use of six for Python 2 & 3 metaclass support @@ -148,7 +148,7 @@ # D413: Missing blank line after last section # D412: No blank lines allowed between a section header and its content
-ignore = D105,D211,FI10,FI12,FI13,FI15,FI16,FI17,FI5,H101,H236,H301,H404,H405,H903,D401,D413,D412,P101,P102,P103,W503 +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
pywikibot-commits@lists.wikimedia.org