From: Jehiah Czebotar Date: Tue, 30 May 2017 13:19:27 +0000 (-0400) Subject: make executable bit and shebang consistent on various source files X-Git-Tag: v5.0.0~18^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8906b3afd899bafd575135c01bb7a99bab752a8e;p=thirdparty%2Ftornado.git make executable bit and shebang consistent on various source files setup.py is intended to be run with "python setup.py install" sources in the tornado module which have main functions/clauses are intended to be run with "python -m tornado.xxx" various demos and scripts can be run directly --- diff --git a/demos/appengine/blog.py b/demos/appengine/blog.py index 5ac4061d6..e2b2ef504 100644 --- a/demos/appengine/blog.py +++ b/demos/appengine/blog.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright 2009 Facebook # diff --git a/demos/benchmark/gen_benchmark.py b/demos/benchmark/gen_benchmark.py old mode 100644 new mode 100755 diff --git a/demos/file_upload/file_receiver.py b/demos/file_upload/file_receiver.py old mode 100644 new mode 100755 diff --git a/demos/s3server/s3server.py b/demos/s3server/s3server.py index f3051a1d3..c01f06c46 100644 --- a/demos/s3server/s3server.py +++ b/demos/s3server/s3server.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright 2009 Facebook # diff --git a/demos/tcpecho/client.py b/demos/tcpecho/client.py old mode 100644 new mode 100755 index a369fa474..51d3a8d5f --- a/demos/tcpecho/client.py +++ b/demos/tcpecho/client.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python + from __future__ import print_function from tornado.ioloop import IOLoop from tornado import gen diff --git a/demos/tcpecho/server.py b/demos/tcpecho/server.py old mode 100644 new mode 100755 index bc0b054a4..ebe683cf0 --- a/demos/tcpecho/server.py +++ b/demos/tcpecho/server.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python + import logging from tornado.ioloop import IOLoop from tornado import gen diff --git a/demos/twitter/twitterdemo.py b/demos/twitter/twitterdemo.py old mode 100644 new mode 100755 diff --git a/demos/webspider/webspider.py b/demos/webspider/webspider.py old mode 100644 new mode 100755 diff --git a/maint/circlerefs/circlerefs.py b/maint/circlerefs/circlerefs.py old mode 100644 new mode 100755 diff --git a/maint/scripts/test_resolvers.py b/maint/scripts/test_resolvers.py old mode 100644 new mode 100755 diff --git a/maint/test/appengine/common/cgi_runtests.py b/maint/test/appengine/common/cgi_runtests.py old mode 100644 new mode 100755 diff --git a/maint/test/appengine/common/runtests.py b/maint/test/appengine/common/runtests.py old mode 100644 new mode 100755 diff --git a/maint/test/redbot/red_test.py b/maint/test/redbot/red_test.py old mode 100644 new mode 100755 diff --git a/maint/test/websocket/client.py b/maint/test/websocket/client.py index d1b1aaf56..03aed1816 100644 --- a/maint/test/websocket/client.py +++ b/maint/test/websocket/client.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - import logging from tornado import gen diff --git a/maint/test/websocket/server.py b/maint/test/websocket/server.py index c237afc78..2b71adda2 100644 --- a/maint/test/websocket/server.py +++ b/maint/test/websocket/server.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - from tornado.ioloop import IOLoop from tornado.options import define, options, parse_command_line from tornado.websocket import WebSocketHandler diff --git a/maint/vm/windows/bootstrap.py b/maint/vm/windows/bootstrap.py old mode 100644 new mode 100755 index e9f4f7d59..281bf573c --- a/maint/vm/windows/bootstrap.py +++ b/maint/vm/windows/bootstrap.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python + r"""Installs files needed for tornado testing on windows. These instructions are compatible with the VMs provided by http://modern.ie. diff --git a/setup.py b/setup.py index 7cea09991..6da90103f 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright 2009 Facebook # diff --git a/tornado/__init__.py b/tornado/__init__.py index c55e9cb05..3bd16d99e 100644 --- a/tornado/__init__.py +++ b/tornado/__init__.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright 2009 Facebook # diff --git a/tornado/_locale_data.py b/tornado/_locale_data.py index 6fa2c2974..a2c503907 100644 --- a/tornado/_locale_data.py +++ b/tornado/_locale_data.py @@ -1,5 +1,4 @@ -#!/usr/bin/env python -# coding: utf-8 +# -*- coding: utf-8 -*- # # Copyright 2012 Facebook # diff --git a/tornado/auth.py b/tornado/auth.py index b8d373a58..8462548fe 100644 --- a/tornado/auth.py +++ b/tornado/auth.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright 2009 Facebook # diff --git a/tornado/autoreload.py b/tornado/autoreload.py index 64204455e..2f9112703 100644 --- a/tornado/autoreload.py +++ b/tornado/autoreload.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright 2009 Facebook # diff --git a/tornado/concurrent.py b/tornado/concurrent.py index dd0d46593..cca6468c4 100644 --- a/tornado/concurrent.py +++ b/tornado/concurrent.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright 2012 Facebook # diff --git a/tornado/curl_httpclient.py b/tornado/curl_httpclient.py index e0ec3fbaf..1523fdcba 100644 --- a/tornado/curl_httpclient.py +++ b/tornado/curl_httpclient.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright 2009 Facebook # diff --git a/tornado/escape.py b/tornado/escape.py index 7fa6853bb..f9699634e 100644 --- a/tornado/escape.py +++ b/tornado/escape.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright 2009 Facebook # diff --git a/tornado/http1connection.py b/tornado/http1connection.py index 4d20593a5..ed906223a 100644 --- a/tornado/http1connection.py +++ b/tornado/http1connection.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright 2014 Facebook # diff --git a/tornado/httpserver.py b/tornado/httpserver.py index da755f846..3498d71fb 100644 --- a/tornado/httpserver.py +++ b/tornado/httpserver.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright 2009 Facebook # diff --git a/tornado/httputil.py b/tornado/httputil.py old mode 100755 new mode 100644 index 1799de598..ceff73509 --- a/tornado/httputil.py +++ b/tornado/httputil.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright 2009 Facebook # diff --git a/tornado/ioloop.py b/tornado/ioloop.py index b28eb46fe..138a61b5c 100644 --- a/tornado/ioloop.py +++ b/tornado/ioloop.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright 2009 Facebook # diff --git a/tornado/iostream.py b/tornado/iostream.py index fb89da089..d77460320 100644 --- a/tornado/iostream.py +++ b/tornado/iostream.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright 2009 Facebook # diff --git a/tornado/locale.py b/tornado/locale.py index 7dba10d61..d45172f3b 100644 --- a/tornado/locale.py +++ b/tornado/locale.py @@ -1,5 +1,5 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- +# # Copyright 2009 Facebook # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/tornado/log.py b/tornado/log.py index fc95a5f98..3074b6371 100644 --- a/tornado/log.py +++ b/tornado/log.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright 2012 Facebook # diff --git a/tornado/netutil.py b/tornado/netutil.py index 5f52e2dea..2d55ccf19 100644 --- a/tornado/netutil.py +++ b/tornado/netutil.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright 2011 Facebook # diff --git a/tornado/options.py b/tornado/options.py index 9635f7580..a6f77029f 100644 --- a/tornado/options.py +++ b/tornado/options.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright 2009 Facebook # diff --git a/tornado/platform/auto.py b/tornado/platform/auto.py index 1f4d70019..1a9133faf 100644 --- a/tornado/platform/auto.py +++ b/tornado/platform/auto.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright 2011 Facebook # diff --git a/tornado/platform/epoll.py b/tornado/platform/epoll.py index 80bfd8af4..4e3461740 100644 --- a/tornado/platform/epoll.py +++ b/tornado/platform/epoll.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright 2012 Facebook # diff --git a/tornado/platform/interface.py b/tornado/platform/interface.py index c0ef2905c..cac532646 100644 --- a/tornado/platform/interface.py +++ b/tornado/platform/interface.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright 2011 Facebook # diff --git a/tornado/platform/kqueue.py b/tornado/platform/kqueue.py index 3a5d41742..4e0aee02e 100644 --- a/tornado/platform/kqueue.py +++ b/tornado/platform/kqueue.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright 2012 Facebook # diff --git a/tornado/platform/posix.py b/tornado/platform/posix.py index 9bf1f1886..6fe1fa837 100644 --- a/tornado/platform/posix.py +++ b/tornado/platform/posix.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright 2011 Facebook # diff --git a/tornado/platform/select.py b/tornado/platform/select.py index a18049f7c..14e8a4745 100644 --- a/tornado/platform/select.py +++ b/tornado/platform/select.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright 2012 Facebook # diff --git a/tornado/process.py b/tornado/process.py index 6da398497..fcf662259 100644 --- a/tornado/process.py +++ b/tornado/process.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright 2011 Facebook # diff --git a/tornado/simple_httpclient.py b/tornado/simple_httpclient.py index 6d90352f1..3c192fcd4 100644 --- a/tornado/simple_httpclient.py +++ b/tornado/simple_httpclient.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python from __future__ import absolute_import, division, print_function from tornado.escape import utf8, _unicode diff --git a/tornado/stack_context.py b/tornado/stack_context.py index 61ae51f4e..2f26f3845 100644 --- a/tornado/stack_context.py +++ b/tornado/stack_context.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright 2010 Facebook # diff --git a/tornado/tcpclient.py b/tornado/tcpclient.py index 549643985..3a1b58ca8 100644 --- a/tornado/tcpclient.py +++ b/tornado/tcpclient.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright 2014 Facebook # diff --git a/tornado/tcpserver.py b/tornado/tcpserver.py index 53cd26af4..1adc48956 100644 --- a/tornado/tcpserver.py +++ b/tornado/tcpserver.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright 2011 Facebook # diff --git a/tornado/template.py b/tornado/template.py index 0818178dc..61b987462 100644 --- a/tornado/template.py +++ b/tornado/template.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright 2009 Facebook # diff --git a/tornado/test/concurrent_test.py b/tornado/test/concurrent_test.py index bbefb1c61..3c7d435fc 100644 --- a/tornado/test/concurrent_test.py +++ b/tornado/test/concurrent_test.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright 2012 Facebook # diff --git a/tornado/test/escape_test.py b/tornado/test/escape_test.py index 70aa4bdd6..f2f2902a0 100644 --- a/tornado/test/escape_test.py +++ b/tornado/test/escape_test.py @@ -1,9 +1,6 @@ -#!/usr/bin/env python - - from __future__ import absolute_import, division, print_function -import tornado.escape +import tornado.escape from tornado.escape import ( utf8, xhtml_escape, xhtml_unescape, url_escape, url_unescape, to_unicode, json_decode, json_encode, squeeze, recursive_unicode, diff --git a/tornado/test/httpclient_test.py b/tornado/test/httpclient_test.py index 140bc3101..f04b9b12c 100644 --- a/tornado/test/httpclient_test.py +++ b/tornado/test/httpclient_test.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - from __future__ import absolute_import, division, print_function import base64 diff --git a/tornado/test/httpserver_test.py b/tornado/test/httpserver_test.py index aa9d831d7..825fa642f 100644 --- a/tornado/test/httpserver_test.py +++ b/tornado/test/httpserver_test.py @@ -1,6 +1,3 @@ -#!/usr/bin/env python - - from __future__ import absolute_import, division, print_function from tornado import netutil diff --git a/tornado/test/httputil_test.py b/tornado/test/httputil_test.py index 8abb07a93..5c064ddea 100644 --- a/tornado/test/httputil_test.py +++ b/tornado/test/httputil_test.py @@ -1,7 +1,4 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- - - from __future__ import absolute_import, division, print_function from tornado.httputil import ( diff --git a/tornado/test/ioloop_test.py b/tornado/test/ioloop_test.py index d5cbebd00..b761a3f54 100644 --- a/tornado/test/ioloop_test.py +++ b/tornado/test/ioloop_test.py @@ -1,7 +1,5 @@ -#!/usr/bin/env python - - from __future__ import absolute_import, division, print_function + import contextlib import datetime import functools diff --git a/tornado/test/log_test.py b/tornado/test/log_test.py index 0565d5668..48519c3c3 100644 --- a/tornado/test/log_test.py +++ b/tornado/test/log_test.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright 2012 Facebook # diff --git a/tornado/test/process_test.py b/tornado/test/process_test.py index 8497a7d8f..c9694f03f 100644 --- a/tornado/test/process_test.py +++ b/tornado/test/process_test.py @@ -1,12 +1,11 @@ -#!/usr/bin/env python - - from __future__ import absolute_import, division, print_function + import logging import os import signal import subprocess import sys + from tornado.httpclient import HTTPClient, HTTPError from tornado.httpserver import HTTPServer from tornado.ioloop import IOLoop diff --git a/tornado/test/runtests.py b/tornado/test/runtests.py index 9699f5133..1dcc5eec7 100644 --- a/tornado/test/runtests.py +++ b/tornado/test/runtests.py @@ -1,12 +1,12 @@ -#!/usr/bin/env python - from __future__ import absolute_import, division, print_function + import gc import locale # system locale module, not tornado.locale import logging import operator import textwrap import sys + from tornado.httpclient import AsyncHTTPClient from tornado.httpserver import HTTPServer from tornado.ioloop import IOLoop diff --git a/tornado/test/stack_context_test.py b/tornado/test/stack_context_test.py index fb9e0d7ac..098f0f0f0 100644 --- a/tornado/test/stack_context_test.py +++ b/tornado/test/stack_context_test.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python from __future__ import absolute_import, division, print_function from tornado import gen diff --git a/tornado/test/tcpclient_test.py b/tornado/test/tcpclient_test.py index faaaf96e7..ca42cf47e 100644 --- a/tornado/test/tcpclient_test.py +++ b/tornado/test/tcpclient_test.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright 2014 Facebook # diff --git a/tornado/test/testing_test.py b/tornado/test/testing_test.py index 21ae7833d..049bc8bbd 100644 --- a/tornado/test/testing_test.py +++ b/tornado/test/testing_test.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - from __future__ import absolute_import, division, print_function from tornado import gen, ioloop diff --git a/tornado/testing.py b/tornado/testing.py index 21d4d8875..5d6d6197d 100644 --- a/tornado/testing.py +++ b/tornado/testing.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """Support classes for automated testing. * `AsyncTestCase` and `AsyncHTTPTestCase`: Subclasses of unittest.TestCase diff --git a/tornado/web.py b/tornado/web.py index 91d9abd1c..5fa3abd8b 100644 --- a/tornado/web.py +++ b/tornado/web.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright 2009 Facebook # diff --git a/tornado/wsgi.py b/tornado/wsgi.py index 68a7615a0..22be7a897 100644 --- a/tornado/wsgi.py +++ b/tornado/wsgi.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright 2009 Facebook #