py3: Switch almost all shebang lines to use `python3`.

This causes `upgrade-zulip-from-git`, as well as a no-option run of
`tools/build-release-tarball`, to produce a Zulip install running
Python 3, rather than Python 2.  In particular this means that the
virtualenv we create, in which all application code runs, is Python 3.

One shebang line, on `zulip-ec2-configure-interfaces`, explicitly
keeps Python 2, and at least one external ops script, `wal-e`, also
still runs on Python 2.  See discussion on the respective previous
commits that made those explicit.  There may also be some other
third-party scripts we use, outside of this source tree and running
outside our virtualenv, that still run on Python 2.
This commit is contained in:
Greg Price 2017-08-02 14:15:16 -07:00 committed by Tim Abbott
parent b7ec1b55dd
commit a099e698e2
88 changed files with 88 additions and 88 deletions

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function
# Remove HTML entity escaping left over from MediaWiki->rST conversion. # Remove HTML entity escaping left over from MediaWiki->rST conversion.

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function
import optparse import optparse
import subprocess import subprocess

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import absolute_import from __future__ import absolute_import
from __future__ import print_function from __future__ import print_function

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
""" Nagios plugin paired with a cron job. This just verifies that the """ Nagios plugin paired with a cron job. This just verifies that the
file output by the cron job is correct. file output by the cron job is correct.
""" """

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
""" """
Nagios plugin to check that none of our queue workers have reported errors. Nagios plugin to check that none of our queue workers have reported errors.

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
""" """
Nagios plugin to check that the rabbitmq has the correct number of consumers. Nagios plugin to check that the rabbitmq has the correct number of consumers.

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
""" """
Nagios plugin to check that the rabbitmq queues are not overflowing as a result Nagios plugin to check that the rabbitmq queues are not overflowing as a result

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
""" """
Script to provide information about send-receive times. Script to provide information about send-receive times.

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
""" """
Nagios plugin to check the difference between the primary and Nagios plugin to check the difference between the primary and

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
""" """
Nagios plugin to check the length of the FTS update log. Nagios plugin to check the length of the FTS update log.

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function
import subprocess import subprocess

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
# Processes updates to postgres Full Text Search for new/edited messages. # Processes updates to postgres Full Text Search for new/edited messages.
# #
# Zulip manages its postgres full-text search as follows. When the # Zulip manages its postgres full-text search as follows. When the

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
""" """
Nagios plugin to check that Zephyr personals mirrors are forwarding. Nagios plugin to check that Zephyr personals mirrors are forwarding.

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
""" """
Nagios plugin to check that our MIT users' Zephyr mirrors are running. Nagios plugin to check that our MIT users' Zephyr mirrors are running.

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
""" """
Nagios plugin to check that Zephyr mirror forwarding is running. Nagios plugin to check that Zephyr mirror forwarding is running.

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import absolute_import from __future__ import absolute_import
from __future__ import print_function from __future__ import print_function

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
import os import os
import argparse import argparse

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
""" """
Forward messages sent to the configured email gateway to Zulip. Forward messages sent to the configured email gateway to Zulip.

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
import sys import sys
import logging import logging
import os import os

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function
import argparse import argparse

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function
import os import os
import sys import sys

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function
import os import os
import shutil import shutil

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
# #
# This script contains the actual logic for upgrading from an old # This script contains the actual logic for upgrading from an old
# version of Zulip to the new version. upgrade-zulip-stage-2 is # version of Zulip to the new version. upgrade-zulip-stage-2 is

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function
import datetime import datetime
import errno import errno

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function
import sys import sys

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function
import sys import sys

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
import sys import sys
import os import os
import logging import logging

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function
import os import os
import sys import sys

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
# This tools generates /etc/zulip/zulip-secrets.conf # This tools generates /etc/zulip/zulip-secrets.conf
from __future__ import print_function from __future__ import print_function

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function
import os import os
from six.moves import configparser from six.moves import configparser

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function
import os import os

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import absolute_import from __future__ import absolute_import
import xml.etree.ElementTree as ET import xml.etree.ElementTree as ET
import subprocess import subprocess

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import absolute_import from __future__ import absolute_import
from __future__ import print_function from __future__ import print_function

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import absolute_import from __future__ import absolute_import
from __future__ import print_function from __future__ import print_function
from lib.css_parser import parse, CssParserException from lib.css_parser import parse, CssParserException

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import absolute_import from __future__ import absolute_import
from __future__ import print_function from __future__ import print_function

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function
import requests import requests

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import absolute_import from __future__ import absolute_import
from __future__ import print_function from __future__ import print_function

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import absolute_import from __future__ import absolute_import
from __future__ import print_function from __future__ import print_function
from lib.template_parser import validate from lib.template_parser import validate

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import absolute_import from __future__ import absolute_import
from __future__ import print_function from __future__ import print_function

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import absolute_import from __future__ import absolute_import
from __future__ import print_function from __future__ import print_function
import os import os

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import absolute_import from __future__ import absolute_import
from __future__ import print_function from __future__ import print_function
import os import os

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import absolute_import from __future__ import absolute_import
from __future__ import print_function from __future__ import print_function
import glob import glob

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import absolute_import from __future__ import absolute_import
from __future__ import print_function from __future__ import print_function

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function
from __future__ import absolute_import from __future__ import absolute_import

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function
from __future__ import absolute_import from __future__ import absolute_import

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function
import os import os

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function
import os import os

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function
import logging import logging

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import absolute_import from __future__ import absolute_import
from __future__ import print_function from __future__ import print_function

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function
from __future__ import absolute_import from __future__ import absolute_import
import sys import sys

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import absolute_import from __future__ import absolute_import
from __future__ import print_function from __future__ import print_function
from lib.html_grep import grep from lib.html_grep import grep

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
""" """
$ ./tools/js-dep-visualizer.py $ ./tools/js-dep-visualizer.py
$ dot -Tpng var/zulip-deps.dot -o var/zulip-deps.png $ dot -Tpng var/zulip-deps.dot -o var/zulip-deps.png

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function
import os import os
import sys import sys

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function
import os import os

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function
from __future__ import absolute_import from __future__ import absolute_import
import logging import logging

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function
from __future__ import absolute_import from __future__ import absolute_import

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
# Minifies JavaScripts, creating source maps # Minifies JavaScripts, creating source maps

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import absolute_import from __future__ import absolute_import
from __future__ import print_function from __future__ import print_function
from typing import List from typing import List

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import absolute_import from __future__ import absolute_import
from __future__ import print_function from __future__ import print_function

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function
import subprocess import subprocess

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
# This script is only meant to be run from run-dev.py, which sets up the # This script is only meant to be run from run-dev.py, which sets up the
# environment correctly and passes the correct arguments for manage.py. It is a # environment correctly and passes the correct arguments for manage.py. It is a

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function
from __future__ import absolute_import from __future__ import absolute_import

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import absolute_import from __future__ import absolute_import
from __future__ import print_function from __future__ import print_function

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
import sys import sys
import os import os
import simplejson import simplejson

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from pygments.lexers import get_all_lexers from pygments.lexers import get_all_lexers
import json import json

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
# #
# See docs/emoji.md for a high-level explanation of how this system # See docs/emoji.md for a high-level explanation of how this system
# works. # works.

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
import os import os
import sys import sys

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function
import sys import sys
import pstats import pstats

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function
import os import os

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function
from __future__ import absolute_import from __future__ import absolute_import
import os import os

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function
from __future__ import absolute_import from __future__ import absolute_import

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function
from __future__ import absolute_import from __future__ import absolute_import
import optparse import optparse

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function
import optparse import optparse
import os import os

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function
from __future__ import absolute_import from __future__ import absolute_import

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function
from __future__ import absolute_import from __future__ import absolute_import

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import absolute_import from __future__ import absolute_import
from __future__ import print_function from __future__ import print_function

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import print_function from __future__ import print_function
import re import re
from collections import defaultdict from collections import defaultdict

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
""" """
Fetch contributors data from Github using their API, convert it to structured Fetch contributors data from Github using their API, convert it to structured
JSON data for the /about page authors section. JSON data for the /about page authors section.

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
# Updates static files for production. # Updates static files for production.

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import absolute_import from __future__ import absolute_import
import argparse import argparse

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Copyright © 2014 Dropbox, Inc. # Copyright © 2014 Dropbox, Inc.

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
"""\ """\
Deliver email messages that have been queued by various things Deliver email messages that have been queued by various things

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
""" """
Forward messages sent to the configured email gateway to Zulip. Forward messages sent to the configured email gateway to Zulip.

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
""" """
Shows backlog count of ScheduledEmail Shows backlog count of ScheduledEmail

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import absolute_import from __future__ import absolute_import
from __future__ import print_function from __future__ import print_function