]> granicus.if.org Git - python/commitdiff
Issue #19936: Added executable bits or shebang lines to Python scripts which
authorSerhiy Storchaka <storchaka@gmail.com>
Thu, 16 Jan 2014 15:15:49 +0000 (17:15 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Thu, 16 Jan 2014 15:15:49 +0000 (17:15 +0200)
requires them.  Disable executable bits and shebang lines in test and
benchmark files in order to prevent using a random system python, and in
source files of modules which don't provide command line interface.  Fixed
shebang line to use python3 executable in the unittestgui script.

84 files changed:
Lib/difflib.py
Lib/http/cookies.py
Lib/lib2to3/tests/data/different_encoding.py [changed mode: 0644->0755]
Lib/lib2to3/tests/data/false_encoding.py [changed mode: 0644->0755]
Lib/mailbox.py
Lib/smtplib.py [changed mode: 0644->0755]
Lib/tarfile.py [changed mode: 0644->0755]
Lib/test/crashers/recursive_call.py [changed mode: 0644->0755]
Lib/test/curses_tests.py [changed mode: 0644->0755]
Lib/test/multibytecodec_support.py
Lib/test/test___future__.py
Lib/test/test_array.py [changed mode: 0755->0644]
Lib/test/test_binhex.py [changed mode: 0755->0644]
Lib/test/test_bz2.py
Lib/test/test_cmd.py
Lib/test/test_codecencodings_cn.py
Lib/test/test_codecencodings_hk.py
Lib/test/test_codecencodings_iso2022.py
Lib/test/test_codecencodings_jp.py
Lib/test/test_codecencodings_kr.py
Lib/test/test_codecencodings_tw.py
Lib/test/test_codecmaps_cn.py
Lib/test/test_codecmaps_hk.py
Lib/test/test_codecmaps_jp.py
Lib/test/test_codecmaps_kr.py
Lib/test/test_codecmaps_tw.py
Lib/test/test_dbm.py
Lib/test/test_dbm_dumb.py
Lib/test/test_eof.py
Lib/test/test_errno.py [changed mode: 0755->0644]
Lib/test/test_gzip.py
Lib/test/test_keywordonlyarg.py
Lib/test/test_logging.py
Lib/test/test_marshal.py
Lib/test/test_multibytecodec.py
Lib/test/test_multiprocessing.py
Lib/test/test_popen.py
Lib/test/test_random.py
Lib/test/test_sched.py
Lib/test/test_smtpnet.py
Lib/test/test_socket.py
Lib/test/test_support.py
Lib/test/test_tcl.py
Lib/test/test_urllib2_localnet.py
Lib/test/test_urllib2net.py
Lib/test/test_urllibnet.py
Lib/test/test_urlparse.py [changed mode: 0755->0644]
Lib/test/test_userstring.py [changed mode: 0755->0644]
Lib/test/test_with.py
Lib/test/test_xmlrpc_net.py
Lib/timeit.py [changed mode: 0644->0755]
Lib/token.py [changed mode: 0755->0644]
Lib/trace.py [changed mode: 0644->0755]
Lib/turtledemo/bytedesign.py [changed mode: 0644->0755]
Lib/turtledemo/clock.py [changed mode: 0644->0755]
Lib/turtledemo/forest.py [changed mode: 0644->0755]
Lib/turtledemo/fractalcurves.py [changed mode: 0644->0755]
Lib/turtledemo/lindenmayer.py [changed mode: 0644->0755]
Lib/turtledemo/minimal_hanoi.py [changed mode: 0644->0755]
Lib/turtledemo/paint.py [changed mode: 0644->0755]
Lib/turtledemo/peace.py [changed mode: 0644->0755]
Lib/turtledemo/penrose.py [changed mode: 0644->0755]
Lib/turtledemo/planet_and_moon.py [changed mode: 0644->0755]
Lib/turtledemo/tree.py [changed mode: 0644->0755]
Lib/turtledemo/two_canvases.py [changed mode: 0644->0755]
Lib/turtledemo/yinyang.py [changed mode: 0644->0755]
Lib/webbrowser.py [changed mode: 0644->0755]
Mac/Tools/bundlebuilder.py [changed mode: 0644->0755]
Misc/NEWS
Modules/_ctypes/libffi/generate-ios-source-and-headers.py [changed mode: 0644->0755]
Modules/_ctypes/libffi/generate-osx-source-and-headers.py [changed mode: 0644->0755]
Modules/_decimal/tests/bench.py [changed mode: 0644->0755]
Modules/_decimal/tests/deccheck.py [changed mode: 0644->0755]
Objects/typeslots.py [changed mode: 0644->0755]
Tools/gdb/libpython.py [changed mode: 0644->0755]
Tools/i18n/makelocalealias.py [changed mode: 0644->0755]
Tools/pybench/Setup.py [changed mode: 0644->0755]
Tools/pybench/clockres.py [changed mode: 0644->0755]
Tools/pybench/systimes.py [changed mode: 0644->0755]
Tools/scripts/run_tests.py [changed mode: 0755->0644]
Tools/ssl/make_ssl_data.py [changed mode: 0644->0755]
Tools/stringbench/stringbench.py [changed mode: 0755->0644]
Tools/unicode/comparecodecs.py [changed mode: 0644->0755]
Tools/unittestgui/unittestgui.py [changed mode: 0644->0755]

index fe94cc47ab5df7c83cfe3e4cc0b7ffa610f6b3c5..f0bfcc507027e67cb4a513075dd0c558e3559fc6 100644 (file)
@@ -1,5 +1,3 @@
-#! /usr/bin/env python3
-
 """
 Module difflib -- helpers for computing deltas between objects.
 
index dc3c74a8db246ffd056d34d7c551110e996bf974..24da5f490c26da057e2929c267f183957236bdcc 100644 (file)
@@ -1,6 +1,3 @@
-#!/usr/bin/env python3
-#
-
 ####
 # Copyright 2000 by Timothy O'Malley <timo@alum.mit.edu>
 #
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index d59dae85cdf01fb4178005a94d31a814b48e48f0..3b64c2ed0daf7eeb0c0f01fd820096f97e663695 100644 (file)
@@ -1,5 +1,3 @@
-#! /usr/bin/env python3
-
 """Read/write support for Maildir, mbox, MH, Babyl, and MMDF mailboxes."""
 
 # Notes for authors of new mailbox subclasses:
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 240032396758d09b5323260ee98d2a566ce207d6..14fea3ef7d332f42427a887ea8e8f65b212006d5 100644 (file)
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
 #
 # multibytecodec_support.py
 #   Common Unittest Routines for CJK codecs
index 9ae4ce40ad47d84331cb759e605d52c328775495..6f73c7fddfda391d4babc05415dc573e63dcc056 100644 (file)
@@ -1,4 +1,3 @@
-#! /usr/bin/env python3
 import unittest
 from test import support
 import __future__
old mode 100755 (executable)
new mode 100644 (file)
index e1362b2..d68284f
@@ -1,4 +1,3 @@
-#! /usr/bin/env python3
 """Test the arraymodule.
    Roger E. Masse
 """
old mode 100755 (executable)
new mode 100644 (file)
index a807bca..9d4c85a
@@ -1,4 +1,3 @@
-#! /usr/bin/env python3
 """Test script for the binhex C module
 
    Uses the mechanism of the python binhex module
index 961053d029611d1df0723b2b7ddc5e2ff2bab5d8..c8c93513d89b20e8f5b3f76db521add4163db7c2 100644 (file)
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
 from test import support
 from test.support import TESTFN, bigmemtest, _4G
 
index 6618535823728dc7ca72668c8f85506c434427cc..e9a0211682a789334cbffec6be1b710c120b7583 100644 (file)
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
 """
 Test script for the 'cmd' module
 Original by Michael Schneider
index b08c5fcb1a7fe02ec3f83c5c46fa63575b4e528a..60e69eb76267a50026a2cc470eef358a8b5e187f 100644 (file)
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
 #
 # test_codecencodings_cn.py
 #   Codec encoding tests for PRC encodings.
index 31363f4bea873f85fc46abcc1f39030592921145..25c05b6048f7dd1b8599bb8dbded900e260cc80f 100644 (file)
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
 #
 # test_codecencodings_hk.py
 #   Codec encoding tests for HongKong encodings.
index e4b2f306d5d934ea877bdae75321adf3c0645e71..87768646fe469d6c2dd477957753b2412dd3e88f 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-#
 # Codec encoding tests for ISO 2022 encodings.
 
 from test import support
index 30c9e195f317af32560199a5c447294eefdea10d..4091948b9b80898b04480db068677914501ee923 100644 (file)
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
 #
 # test_codecencodings_jp.py
 #   Codec encoding tests for Japanese encodings.
index 4dd60499c87fa99c38c02c254acca2046fc6b0f3..cd7696acaa344cd2208fdf7c116c3ee4d6ae42ec 100644 (file)
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
 #
 # test_codecencodings_kr.py
 #   Codec encoding tests for ROK encodings.
index 96245b74ed3463884f86dc41c8e8701407b3c32d..ea6e1c1623985053b7b80ad88779101cc2794fbd 100644 (file)
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
 #
 # test_codecencodings_tw.py
 #   Codec encoding tests for ROC encodings.
index 1a761cffc763ca2fc01d2d3ab5eddd9def359bad..76632a24352e34c1738bf0d0c9a2eded0db775ea 100644 (file)
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
 #
 # test_codecmaps_cn.py
 #   Codec mapping tests for PRC encodings
index 5f4e7c7e0201e33fb9f3eba9974f1ebc833d820e..278ae2ffeb3e43dbd3ebb2ef2be241dadf8cda53 100644 (file)
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
 #
 # test_codecmaps_hk.py
 #   Codec mapping tests for HongKong encodings
index 1fdbf634e3ac9c867c5fd1ac614a4fa5b593db50..fa93f12f5a36f86a79c82ff271b673ad65b7ee12 100644 (file)
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
 #
 # test_codecmaps_jp.py
 #   Codec mapping tests for Japanese encodings
index 03564025ed25f5c7f4fa9072ba346686423c7e56..e0bf71699488efa59263f261ce2308d6e397a134 100644 (file)
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
 #
 # test_codecmaps_kr.py
 #   Codec mapping tests for ROK encodings
index 44467e378a72bbbeec2f174e9cfd42a1cf906138..4d270804f09d6016634031c8de1e64ee15609c2f 100644 (file)
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
 #
 # test_codecmaps_tw.py
 #   Codec mapping tests for ROC encodings
index 243a0af10319523e7fe02bfb4404ba7e58f04dc5..d11d924b3085a17dc619729a7e2011ca78517165 100644 (file)
@@ -1,4 +1,3 @@
-#! /usr/bin/env python3
 """Test script for the dbm.open function based on testdumbdbm.py"""
 
 import os
index 208bc4c3823e003c8d0f9cc0f62531f8a21b7e4b..4f03ae7e5854a90474598839b0de79f7e6728f31 100644 (file)
@@ -1,4 +1,3 @@
-#! /usr/bin/env python3
 """Test script for the dumbdbm module
    Original by Roger E. Masse
 """
index fb4ac9a639fbc1d1db69347e2d8b07163794a2e0..52e7932c1ab085eefb4df40ab6fb5db876335af9 100644 (file)
@@ -1,4 +1,3 @@
-#! /usr/bin/env python3
 """test script for a few new invalid token catches"""
 
 import unittest
old mode 100755 (executable)
new mode 100644 (file)
index f414a87..058dcb9
@@ -1,4 +1,3 @@
-#! /usr/bin/env python3
 """Test the errno module
    Roger E. Masse
 """
index 5eac9217b227b130a7d8dad2dc213540ef5275ed..c94d54e02e62692201f41412aea5eb4dbc55bde9 100755 (executable)
@@ -1,4 +1,3 @@
-#! /usr/bin/env python3
 """Test script for the gzip module.
 """
 
index 0503a7fc6a4d300c6270240a425ddc16a8d837f1..6c2ff00362b371338db21f75992e9a30c64f13ca 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python3
-
 """Unit tests for the keyword only argument specified in PEP 3102."""
 
 __author__ = "Jiwon Seo"
index 814f68cc15452ce36086baf2f2ca95eecb9b3415..f34172a371d1ce7380024dace061ade40bee7d71 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-#
 # Copyright 2001-2013 by Vinay Sajip. All Rights Reserved.
 #
 # Permission to use, copy, modify, and distribute this software and its
index af7a9594872bfcd70c08e03e8d6eb0f1132e4fa3..0b1413715d5ae545af88143eaeb038d627f11142 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python3
-
 from test import support
 import array
 import io
index feb7bd595a26566c07a80d6510f884b1b08798b0..6889184cce6fcf0f77d9d8a4e4278935e3bf551a 100644 (file)
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
 #
 # test_multibytecodec.py
 #   Unit test for multibytecodec itself
index d20a57698d2fdfde81bf1d011f18d66e28ab3fc6..aa66db4b7e6e3608e64909d7675b96dec27b43de 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python3
-
 #
 # Unit tests for the multiprocessing package
 #
index accf187b54d7f3e053cbde1240ba60121f4bfb78..225e41f86b48adb2d0d3078dcfb5cd57f4f4139f 100644 (file)
@@ -1,4 +1,3 @@
-#! /usr/bin/env python3
 """Basic tests for os.popen()
 
   Particularly useful for platforms that fake popen.
index d363a6a1d15adf4826be0eb15282f41d3dd7ac62..a475207fbd1a6ff7e1a9f6498ec99d6e25af97a5 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python3
-
 import unittest
 import random
 import time
index 070886d1ea5f3b32520355738aca5add2f208bdb..79fa7d3e3dd014126bde0948627b853aaf65453d 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 import queue
 import sched
 import time
index 86224ef2e45beb669e3503f2300595bb515c1656..e97cf363bb68dfae7cda9531e6645e93c48c553f 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python3
-
 import unittest
 from test import support
 import smtplib
index ce3c16ca821611d0bb8bb899f7b3f218213a4a56..d6e8389eb48bf36d6fd11fb3b9c1845ffa5415fd 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python3
-
 import unittest
 from test import support
 from unittest.case import _ExpectedFailure
index 4edb1a8e01ce5a3774302f37cde209295074d14a..5913044877c1def3b333d516ecbaa459583b7d46 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 import importlib
 import shutil
 import sys
index 5a2b69a0bef8bc84a31cca987441df7cc7b43573..ad17ee95d3cc82bc5abf2972ea492f72d7257947 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python3
-
 import unittest
 import sys
 import os
index 9112e5062b1c6b4f28c7b18325f0f28ae1a49a5d..31c638fc4e87efbd7d7347da92d606c4ddaf6a32 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python3
-
 import os
 import email
 import urllib.parse
index 7f3c93adaa56b57952a571fa13eccb2964f14c75..a4c16224fb43677436064fe4a94231636f6d51db 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python3
-
 import unittest
 from test import support
 from test.test_urllib2 import sanepathname2url
index 9aa16b4c9ce9250bc9be9fde04ec8b2c3cf97933..4e0b7bde9ad7ef54c7ec17dfe654d83e6d75fac0 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python3
-
 import unittest
 from test import support
 
old mode 100755 (executable)
new mode 100644 (file)
index 378a427..9d695da
@@ -1,5 +1,3 @@
-#! /usr/bin/env python3
-
 from test import support
 import unittest
 import urllib.parse
old mode 100755 (executable)
new mode 100644 (file)
index 71fcac2..34c629c
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
 # UserString is a wrapper around the native builtin string type.
 # UserString instances should behave similar to builtin string objects.
 
index e8cc8c056ec6c53d447bf0ad0c130fc7950049aa..7068a809702d03d8e045e11bc8c1938cd19cca27 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python3
-
 """Unit tests for the with statement specified in PEP 343."""
 
 
index 4c6f1ec4e956c288f6f9f66800cb870d38494a47..77f66ea57bdc876d10f5f2906b9f555dbd3cbdfe 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python3
-
 import collections.abc
 import errno
 import socket
old mode 100644 (file)
new mode 100755 (executable)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index ed9eafbfb652471e1d5ac16d64950815293e4077..a5e8482b473001e5e43ea422ebdbc1e7aaba6091 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -334,6 +334,12 @@ Build
 Tools/Demos
 -----------
 
+- Issue #19936: Added executable bits or shebang lines to Python scripts which
+  requires them.  Disable executable bits and shebang lines in test and
+  benchmark files in order to prevent using a random system python, and in
+  source files of modules which don't provide command line interface.  Fixed
+  shebang line to use python3 executable in the unittestgui script.
+
 - Issue #18960: 2to3 and the findnocoding.py script now ignore the source
   encoding declaration on the second line if the first line contains anything
   except a comment.
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 09a20e2..c3b5fa4
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 """
 GUI framework and application for use with Python unit testing framework.
 Execute tests written using the framework provided by the 'unittest' module.