From a603a4f9f5a06c2b41db0a67d63d1f324388aac3 Mon Sep 17 00:00:00 2001 From: rht Date: Sat, 14 Oct 2017 15:59:58 +0200 Subject: [PATCH] Remove `from __future__ import absolute_import`. Except in: - docs/writing-bots-guide.md, because bots are supposed to be Python 2 compatible - puppet/zulip_ops/files/zulip-ec2-configure-interfaces, because this script is still on python2.7 - tools/lint - tools/linter_lib - tools/lister.py For the latter two, because they might be yanked away to a separate repo for general use with other FLOSS projects. --- analytics/lib/fixtures.py | 2 +- confirmation/models.py | 2 -- docs/webhook-walkthrough.md | 1 - manage.py | 2 -- scripts/get-django-setting | 2 -- scripts/lib/email-mirror-postfix | 1 - static/assets/favicon/generate | 1 - tools/linter_lib/printer.py | 3 ++- 8 files changed, 3 insertions(+), 11 deletions(-) diff --git a/analytics/lib/fixtures.py b/analytics/lib/fixtures.py index ea8719e720..f06c0be7cf 100644 --- a/analytics/lib/fixtures.py +++ b/analytics/lib/fixtures.py @@ -1,4 +1,4 @@ -from __future__ import division, absolute_import +from __future__ import division from zerver.models import Realm, UserProfile, Stream, Message from analytics.models import InstallationCount, RealmCount, UserCount, StreamCount diff --git a/confirmation/models.py b/confirmation/models.py index 15b1dd5e6f..73a055fe48 100644 --- a/confirmation/models.py +++ b/confirmation/models.py @@ -2,8 +2,6 @@ # Copyright: (c) 2008, Jarek Zgoda -from __future__ import absolute_import - __revision__ = '$Id: models.py 28 2009-10-22 15:03:02Z jarek.zgoda $' import datetime diff --git a/docs/webhook-walkthrough.md b/docs/webhook-walkthrough.md index d6feb065dd..8acc03e96d 100644 --- a/docs/webhook-walkthrough.md +++ b/docs/webhook-walkthrough.md @@ -58,7 +58,6 @@ python file, `zerver/webhooks/mywebhook/view.py`. The Hello World integration is in `zerver/webhooks/helloworld/view.py`: ``` -from __future__ import absolute_import from django.utils.translation import ugettext as _ from zerver.lib.actions import check_send_stream_message from zerver.lib.response import json_success, json_error diff --git a/manage.py b/manage.py index 06aedf9af6..6e2c5d7560 100755 --- a/manage.py +++ b/manage.py @@ -1,6 +1,4 @@ #!/usr/bin/env python3 -from __future__ import absolute_import - import os import sys diff --git a/scripts/get-django-setting b/scripts/get-django-setting index b6b3ff5206..7933f22a8f 100755 --- a/scripts/get-django-setting +++ b/scripts/get-django-setting @@ -1,6 +1,4 @@ #!/usr/bin/env python3 -from __future__ import absolute_import - import os import sys diff --git a/scripts/lib/email-mirror-postfix b/scripts/lib/email-mirror-postfix index 112384d442..9ae24b0ade 100755 --- a/scripts/lib/email-mirror-postfix +++ b/scripts/lib/email-mirror-postfix @@ -37,7 +37,6 @@ Also you can use optional keys to configure the script and change default values -t Disable sending request to the Zulip server. Default value: False. """ -from __future__ import absolute_import import os import ssl diff --git a/static/assets/favicon/generate b/static/assets/favicon/generate index 54bdb2b0c8..2ba9776be6 100755 --- a/static/assets/favicon/generate +++ b/static/assets/favicon/generate @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -from __future__ import absolute_import import xml.etree.ElementTree as ET import subprocess from six.moves import range diff --git a/tools/linter_lib/printer.py b/tools/linter_lib/printer.py index b2e77c5f1b..869b359f22 100644 --- a/tools/linter_lib/printer.py +++ b/tools/linter_lib/printer.py @@ -1,4 +1,5 @@ -from __future__ import print_function, absolute_import +from __future__ import print_function +from __future__ import absolute_import import sys import os