[Python-checkins] cpython (2.7): Issue #19936: Added executable bits or shebang lines to Python scripts which

serhiy.storchaka python-checkins at python.org
Thu Jan 16 18:00:12 CET 2014


http://hg.python.org/cpython/rev/334116bb2939
changeset:   88508:334116bb2939
branch:      2.7
parent:      88499:40289a03569f
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Thu Jan 16 18:59:17 2014 +0200
summary:
  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.

files:
  Demo/comparisons/patterns                                 |  0 
  Demo/curses/ncurses.py                                    |  0 
  Demo/curses/rain.py                                       |  0 
  Demo/curses/tclock.py                                     |  0 
  Demo/md5test/foo                                          |  0 
  Demo/scripts/newslist.doc                                 |  0 
  Demo/tix/bitmaps/about.xpm                                |  0 
  Demo/tix/bitmaps/bold.xbm                                 |  0 
  Demo/tix/bitmaps/capital.xbm                              |  0 
  Demo/tix/bitmaps/centerj.xbm                              |  0 
  Demo/tix/bitmaps/combobox.xbm                             |  0 
  Demo/tix/bitmaps/combobox.xpm                             |  0 
  Demo/tix/bitmaps/combobox.xpm.1                           |  0 
  Demo/tix/bitmaps/drivea.xbm                               |  0 
  Demo/tix/bitmaps/drivea.xpm                               |  0 
  Demo/tix/bitmaps/exit.xpm                                 |  0 
  Demo/tix/bitmaps/filebox.xbm                              |  0 
  Demo/tix/bitmaps/filebox.xpm                              |  0 
  Demo/tix/bitmaps/italic.xbm                               |  0 
  Demo/tix/bitmaps/justify.xbm                              |  0 
  Demo/tix/bitmaps/leftj.xbm                                |  0 
  Demo/tix/bitmaps/netw.xbm                                 |  0 
  Demo/tix/bitmaps/netw.xpm                                 |  0 
  Demo/tix/bitmaps/optmenu.xpm                              |  0 
  Demo/tix/bitmaps/rightj.xbm                               |  0 
  Demo/tix/bitmaps/select.xpm                               |  0 
  Demo/tix/bitmaps/underline.xbm                            |  0 
  Demo/tkinter/guido/canvasevents.py                        |  0 
  Demo/tkinter/guido/newmenubardemo.py                      |  0 
  Demo/tkinter/guido/sortvisu.py                            |  0 
  Demo/turtle/tdemo_I_dontlike_tiltdemo.py                  |  0 
  Demo/turtle/tdemo_bytedesign.py                           |  0 
  Demo/turtle/tdemo_clock.py                                |  0 
  Demo/turtle/tdemo_fractalcurves.py                        |  0 
  Demo/turtle/tdemo_lindenmayer_indian.py                   |  0 
  Demo/turtle/tdemo_minimal_hanoi.py                        |  0 
  Demo/turtle/tdemo_paint.py                                |  0 
  Demo/turtle/tdemo_peace.py                                |  0 
  Demo/turtle/tdemo_penrose.py                              |  0 
  Demo/turtle/tdemo_planet_and_moon.py                      |  0 
  Demo/turtle/tdemo_tree.py                                 |  0 
  Demo/turtle/tdemo_yinyang.py                              |  0 
  Demo/turtle/turtleDemo.py                                 |  0 
  Demo/turtle/turtledemo_two_canvases.py                    |  0 
  Lib/Cookie.py                                             |  3 ---
  Lib/bsddb/dbshelve.py                                     |  1 -
  Lib/bsddb/test/test_dbtables.py                           |  2 --
  Lib/difflib.py                                            |  2 --
  Lib/encodings/rot_13.py                                   |  0 
  Lib/lib2to3/tests/data/different_encoding.py              |  0 
  Lib/lib2to3/tests/data/false_encoding.py                  |  0 
  Lib/mailbox.py                                            |  2 --
  Lib/tarfile.py                                            |  1 -
  Lib/test/crashers/recursive_call.py                       |  0 
  Lib/test/curses_tests.py                                  |  0 
  Lib/test/test___future__.py                               |  1 -
  Lib/test/test_al.py                                       |  1 -
  Lib/test/test_anydbm.py                                   |  1 -
  Lib/test/test_array.py                                    |  1 -
  Lib/test/test_binhex.py                                   |  1 -
  Lib/test/test_bsddb.py                                    |  1 -
  Lib/test/test_bz2.py                                      |  1 -
  Lib/test/test_cd.py                                       |  1 -
  Lib/test/test_cl.py                                       |  1 -
  Lib/test/test_cmd.py                                      |  1 -
  Lib/test/test_codecencodings_cn.py                        |  1 -
  Lib/test/test_codecencodings_hk.py                        |  1 -
  Lib/test/test_codecencodings_iso2022.py                   |  2 --
  Lib/test/test_codecencodings_jp.py                        |  1 -
  Lib/test/test_codecencodings_kr.py                        |  1 -
  Lib/test/test_codecencodings_tw.py                        |  1 -
  Lib/test/test_codecmaps_cn.py                             |  1 -
  Lib/test/test_codecmaps_hk.py                             |  1 -
  Lib/test/test_codecmaps_jp.py                             |  1 -
  Lib/test/test_codecmaps_kr.py                             |  1 -
  Lib/test/test_codecmaps_tw.py                             |  1 -
  Lib/test/test_dl.py                                       |  1 -
  Lib/test/test_dumbdbm.py                                  |  1 -
  Lib/test/test_eof.py                                      |  1 -
  Lib/test/test_errno.py                                    |  1 -
  Lib/test/test_gl.py                                       |  1 -
  Lib/test/test_gzip.py                                     |  1 -
  Lib/test/test_imageop.py                                  |  2 --
  Lib/test/test_imgfile.py                                  |  2 --
  Lib/test/test_logging.py                                  |  2 --
  Lib/test/test_marshal.py                                  |  1 -
  Lib/test/test_multibytecodec.py                           |  2 --
  Lib/test/test_multibytecodec_support.py                   |  2 --
  Lib/test/test_multiprocessing.py                          |  2 --
  Lib/test/test_popen.py                                    |  1 -
  Lib/test/test_popen2.py                                   |  1 -
  Lib/test/test_random.py                                   |  2 --
  Lib/test/test_sets.py                                     |  2 --
  Lib/test/test_smtpnet.py                                  |  2 --
  Lib/test/test_socket.py                                   |  2 --
  Lib/test/test_tcl.py                                      |  2 --
  Lib/test/test_urllib2_localnet.py                         |  2 --
  Lib/test/test_urllib2net.py                               |  2 --
  Lib/test/test_urllibnet.py                                |  2 --
  Lib/test/test_urlparse.py                                 |  2 --
  Lib/test/test_userstring.py                               |  1 -
  Lib/test/test_whichdb.py                                  |  1 -
  Lib/test/test_with.py                                     |  2 --
  Lib/timeit.py                                             |  0 
  Lib/token.py                                              |  2 --
  Lib/trace.py                                              |  0 
  Lib/webbrowser.py                                         |  0 
  Mac/Modules/carbonevt/_CarbonEvtmodule.c                  |  0 
  Mac/Modules/cg/CFMLateImport.c                            |  0 
  Mac/Modules/cg/CFMLateImport.h                            |  0 
  Mac/Modules/cg/CGStubLib.exp                              |  0 
  Mac/Modules/cg/CGStubLib.readme                           |  0 
  Mac/Modules/cg/_CGmodule.c                                |  0 
  Mac/PythonLauncher/FileSettings.h                         |  0 
  Mac/PythonLauncher/FileSettings.m                         |  0 
  Mac/PythonLauncher/MyDocument.h                           |  0 
  Mac/PythonLauncher/MyDocument.m                           |  0 
  Mac/PythonLauncher/main.m                                 |  0 
  Mac/Tools/fixapplepython23.py                             |  0 
  Mac/scripts/buildpkg.py                                   |  0 
  Mac/scripts/mkestrres-macerrors.h                         |  0 
  Mac/scripts/zappycfiles.py                                |  0 
  Misc/NEWS                                                 |  8 ++++++++
  Modules/_ctypes/libffi/generate-ios-source-and-headers.py |  0 
  Modules/_ctypes/libffi/generate-osx-source-and-headers.py |  0 
  PC/msvcrtmodule.c                                         |  0 
  Tools/gdb/libpython.py                                    |  0 
  Tools/i18n/makelocalealias.py                             |  0 
  Tools/pybench/Setup.py                                    |  0 
  Tools/pybench/clockres.py                                 |  0 
  Tools/pybench/systimes.py                                 |  0 
  Tools/scripts/svneol.py                                   |  0 
  Tools/ssl/get-remote-certificate.py                       |  0 
  Tools/unicode/comparecodecs.py                            |  0 
  134 files changed, 8 insertions(+), 78 deletions(-)


diff --git a/Demo/comparisons/patterns b/Demo/comparisons/patterns
old mode 100755
new mode 100644
diff --git a/Demo/curses/ncurses.py b/Demo/curses/ncurses.py
old mode 100644
new mode 100755
diff --git a/Demo/curses/rain.py b/Demo/curses/rain.py
old mode 100644
new mode 100755
diff --git a/Demo/curses/tclock.py b/Demo/curses/tclock.py
old mode 100644
new mode 100755
diff --git a/Demo/md5test/foo b/Demo/md5test/foo
old mode 100755
new mode 100644
diff --git a/Demo/scripts/newslist.doc b/Demo/scripts/newslist.doc
old mode 100755
new mode 100644
diff --git a/Demo/tix/bitmaps/about.xpm b/Demo/tix/bitmaps/about.xpm
old mode 100755
new mode 100644
diff --git a/Demo/tix/bitmaps/bold.xbm b/Demo/tix/bitmaps/bold.xbm
old mode 100755
new mode 100644
diff --git a/Demo/tix/bitmaps/capital.xbm b/Demo/tix/bitmaps/capital.xbm
old mode 100755
new mode 100644
diff --git a/Demo/tix/bitmaps/centerj.xbm b/Demo/tix/bitmaps/centerj.xbm
old mode 100755
new mode 100644
diff --git a/Demo/tix/bitmaps/combobox.xbm b/Demo/tix/bitmaps/combobox.xbm
old mode 100755
new mode 100644
diff --git a/Demo/tix/bitmaps/combobox.xpm b/Demo/tix/bitmaps/combobox.xpm
old mode 100755
new mode 100644
diff --git a/Demo/tix/bitmaps/combobox.xpm.1 b/Demo/tix/bitmaps/combobox.xpm.1
old mode 100755
new mode 100644
diff --git a/Demo/tix/bitmaps/drivea.xbm b/Demo/tix/bitmaps/drivea.xbm
old mode 100755
new mode 100644
diff --git a/Demo/tix/bitmaps/drivea.xpm b/Demo/tix/bitmaps/drivea.xpm
old mode 100755
new mode 100644
diff --git a/Demo/tix/bitmaps/exit.xpm b/Demo/tix/bitmaps/exit.xpm
old mode 100755
new mode 100644
diff --git a/Demo/tix/bitmaps/filebox.xbm b/Demo/tix/bitmaps/filebox.xbm
old mode 100755
new mode 100644
diff --git a/Demo/tix/bitmaps/filebox.xpm b/Demo/tix/bitmaps/filebox.xpm
old mode 100755
new mode 100644
diff --git a/Demo/tix/bitmaps/italic.xbm b/Demo/tix/bitmaps/italic.xbm
old mode 100755
new mode 100644
diff --git a/Demo/tix/bitmaps/justify.xbm b/Demo/tix/bitmaps/justify.xbm
old mode 100755
new mode 100644
diff --git a/Demo/tix/bitmaps/leftj.xbm b/Demo/tix/bitmaps/leftj.xbm
old mode 100755
new mode 100644
diff --git a/Demo/tix/bitmaps/netw.xbm b/Demo/tix/bitmaps/netw.xbm
old mode 100755
new mode 100644
diff --git a/Demo/tix/bitmaps/netw.xpm b/Demo/tix/bitmaps/netw.xpm
old mode 100755
new mode 100644
diff --git a/Demo/tix/bitmaps/optmenu.xpm b/Demo/tix/bitmaps/optmenu.xpm
old mode 100755
new mode 100644
diff --git a/Demo/tix/bitmaps/rightj.xbm b/Demo/tix/bitmaps/rightj.xbm
old mode 100755
new mode 100644
diff --git a/Demo/tix/bitmaps/select.xpm b/Demo/tix/bitmaps/select.xpm
old mode 100755
new mode 100644
diff --git a/Demo/tix/bitmaps/underline.xbm b/Demo/tix/bitmaps/underline.xbm
old mode 100755
new mode 100644
diff --git a/Demo/tkinter/guido/canvasevents.py b/Demo/tkinter/guido/canvasevents.py
old mode 100644
new mode 100755
diff --git a/Demo/tkinter/guido/newmenubardemo.py b/Demo/tkinter/guido/newmenubardemo.py
old mode 100644
new mode 100755
diff --git a/Demo/tkinter/guido/sortvisu.py b/Demo/tkinter/guido/sortvisu.py
old mode 100644
new mode 100755
diff --git a/Demo/turtle/tdemo_I_dontlike_tiltdemo.py b/Demo/turtle/tdemo_I_dontlike_tiltdemo.py
old mode 100644
new mode 100755
diff --git a/Demo/turtle/tdemo_bytedesign.py b/Demo/turtle/tdemo_bytedesign.py
old mode 100644
new mode 100755
diff --git a/Demo/turtle/tdemo_clock.py b/Demo/turtle/tdemo_clock.py
old mode 100644
new mode 100755
diff --git a/Demo/turtle/tdemo_fractalcurves.py b/Demo/turtle/tdemo_fractalcurves.py
old mode 100644
new mode 100755
diff --git a/Demo/turtle/tdemo_lindenmayer_indian.py b/Demo/turtle/tdemo_lindenmayer_indian.py
old mode 100644
new mode 100755
diff --git a/Demo/turtle/tdemo_minimal_hanoi.py b/Demo/turtle/tdemo_minimal_hanoi.py
old mode 100644
new mode 100755
diff --git a/Demo/turtle/tdemo_paint.py b/Demo/turtle/tdemo_paint.py
old mode 100644
new mode 100755
diff --git a/Demo/turtle/tdemo_peace.py b/Demo/turtle/tdemo_peace.py
old mode 100644
new mode 100755
diff --git a/Demo/turtle/tdemo_penrose.py b/Demo/turtle/tdemo_penrose.py
old mode 100644
new mode 100755
diff --git a/Demo/turtle/tdemo_planet_and_moon.py b/Demo/turtle/tdemo_planet_and_moon.py
old mode 100644
new mode 100755
diff --git a/Demo/turtle/tdemo_tree.py b/Demo/turtle/tdemo_tree.py
old mode 100644
new mode 100755
diff --git a/Demo/turtle/tdemo_yinyang.py b/Demo/turtle/tdemo_yinyang.py
old mode 100644
new mode 100755
diff --git a/Demo/turtle/turtleDemo.py b/Demo/turtle/turtleDemo.py
old mode 100644
new mode 100755
diff --git a/Demo/turtle/turtledemo_two_canvases.py b/Demo/turtle/turtledemo_two_canvases.py
old mode 100644
new mode 100755
diff --git a/Lib/Cookie.py b/Lib/Cookie.py
--- a/Lib/Cookie.py
+++ b/Lib/Cookie.py
@@ -1,6 +1,3 @@
-#!/usr/bin/env python
-#
-
 ####
 # Copyright 2000 by Timothy O'Malley <timo at alum.mit.edu>
 #
diff --git a/Lib/bsddb/dbshelve.py b/Lib/bsddb/dbshelve.py
--- a/Lib/bsddb/dbshelve.py
+++ b/Lib/bsddb/dbshelve.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #------------------------------------------------------------------------
 #           Copyright (c) 1997-2001 by Total Control Software
 #                         All Rights Reserved
diff --git a/Lib/bsddb/test/test_dbtables.py b/Lib/bsddb/test/test_dbtables.py
--- a/Lib/bsddb/test/test_dbtables.py
+++ b/Lib/bsddb/test/test_dbtables.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-#
 #-----------------------------------------------------------------------
 # A test suite for the table interface built on bsddb.db
 #-----------------------------------------------------------------------
diff --git a/Lib/difflib.py b/Lib/difflib.py
--- a/Lib/difflib.py
+++ b/Lib/difflib.py
@@ -1,5 +1,3 @@
-#! /usr/bin/env python
-
 """
 Module difflib -- helpers for computing deltas between objects.
 
diff --git a/Lib/encodings/rot_13.py b/Lib/encodings/rot_13.py
old mode 100644
new mode 100755
diff --git a/Lib/lib2to3/tests/data/different_encoding.py b/Lib/lib2to3/tests/data/different_encoding.py
old mode 100644
new mode 100755
diff --git a/Lib/lib2to3/tests/data/false_encoding.py b/Lib/lib2to3/tests/data/false_encoding.py
old mode 100644
new mode 100755
diff --git a/Lib/mailbox.py b/Lib/mailbox.py
--- a/Lib/mailbox.py
+++ b/Lib/mailbox.py
@@ -1,5 +1,3 @@
-#! /usr/bin/env python
-
 """Read/write support for Maildir, mbox, MH, Babyl, and MMDF mailboxes."""
 
 # Notes for authors of new mailbox subclasses:
diff --git a/Lib/tarfile.py b/Lib/tarfile.py
--- a/Lib/tarfile.py
+++ b/Lib/tarfile.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 # -*- coding: iso-8859-1 -*-
 #-------------------------------------------------------------------
 # tarfile.py
diff --git a/Lib/test/crashers/recursive_call.py b/Lib/test/crashers/recursive_call.py
old mode 100644
new mode 100755
diff --git a/Lib/test/curses_tests.py b/Lib/test/curses_tests.py
old mode 100644
new mode 100755
diff --git a/Lib/test/test___future__.py b/Lib/test/test___future__.py
--- a/Lib/test/test___future__.py
+++ b/Lib/test/test___future__.py
@@ -1,4 +1,3 @@
-#! /usr/bin/env python
 import unittest
 from test import test_support
 import __future__
diff --git a/Lib/test/test_al.py b/Lib/test/test_al.py
old mode 100755
new mode 100644
--- a/Lib/test/test_al.py
+++ b/Lib/test/test_al.py
@@ -1,4 +1,3 @@
-#! /usr/bin/env python
 """Whimpy test script for the al module
    Roger E. Masse
 """
diff --git a/Lib/test/test_anydbm.py b/Lib/test/test_anydbm.py
--- a/Lib/test/test_anydbm.py
+++ b/Lib/test/test_anydbm.py
@@ -1,4 +1,3 @@
-#! /usr/bin/env python
 """Test script for the anydbm module
    based on testdumbdbm.py
 """
diff --git a/Lib/test/test_array.py b/Lib/test/test_array.py
old mode 100755
new mode 100644
--- a/Lib/test/test_array.py
+++ b/Lib/test/test_array.py
@@ -1,4 +1,3 @@
-#! /usr/bin/env python
 """Test the arraymodule.
    Roger E. Masse
 """
diff --git a/Lib/test/test_binhex.py b/Lib/test/test_binhex.py
old mode 100755
new mode 100644
--- a/Lib/test/test_binhex.py
+++ b/Lib/test/test_binhex.py
@@ -1,4 +1,3 @@
-#! /usr/bin/env python
 """Test script for the binhex C module
 
    Uses the mechanism of the python binhex module
diff --git a/Lib/test/test_bsddb.py b/Lib/test/test_bsddb.py
old mode 100755
new mode 100644
--- a/Lib/test/test_bsddb.py
+++ b/Lib/test/test_bsddb.py
@@ -1,4 +1,3 @@
-#! /usr/bin/env python
 """Test script for the bsddb C module by Roger E. Masse
    Adapted to unittest format and expanded scope by Raymond Hettinger
 """
diff --git a/Lib/test/test_bz2.py b/Lib/test/test_bz2.py
--- a/Lib/test/test_bz2.py
+++ b/Lib/test/test_bz2.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 from test import test_support
 from test.test_support import TESTFN, _4G, bigmemtest, import_module, findfile
 
diff --git a/Lib/test/test_cd.py b/Lib/test/test_cd.py
old mode 100755
new mode 100644
--- a/Lib/test/test_cd.py
+++ b/Lib/test/test_cd.py
@@ -1,4 +1,3 @@
-#! /usr/bin/env python
 """Whimpy test script for the cd module
    Roger E. Masse
 """
diff --git a/Lib/test/test_cl.py b/Lib/test/test_cl.py
old mode 100755
new mode 100644
--- a/Lib/test/test_cl.py
+++ b/Lib/test/test_cl.py
@@ -1,4 +1,3 @@
-#! /usr/bin/env python
 """Whimpy test script for the cl module
    Roger E. Masse
 """
diff --git a/Lib/test/test_cmd.py b/Lib/test/test_cmd.py
--- a/Lib/test/test_cmd.py
+++ b/Lib/test/test_cmd.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 """
 Test script for the 'cmd' module
 Original by Michael Schneider
diff --git a/Lib/test/test_codecencodings_cn.py b/Lib/test/test_codecencodings_cn.py
--- a/Lib/test/test_codecencodings_cn.py
+++ b/Lib/test/test_codecencodings_cn.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #
 # test_codecencodings_cn.py
 #   Codec encoding tests for PRC encodings.
diff --git a/Lib/test/test_codecencodings_hk.py b/Lib/test/test_codecencodings_hk.py
--- a/Lib/test/test_codecencodings_hk.py
+++ b/Lib/test/test_codecencodings_hk.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #
 # test_codecencodings_hk.py
 #   Codec encoding tests for HongKong encodings.
diff --git a/Lib/test/test_codecencodings_iso2022.py b/Lib/test/test_codecencodings_iso2022.py
--- a/Lib/test/test_codecencodings_iso2022.py
+++ b/Lib/test/test_codecencodings_iso2022.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-#
 # Codec encoding tests for ISO 2022 encodings.
 
 from test import test_support
diff --git a/Lib/test/test_codecencodings_jp.py b/Lib/test/test_codecencodings_jp.py
--- a/Lib/test/test_codecencodings_jp.py
+++ b/Lib/test/test_codecencodings_jp.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #
 # test_codecencodings_jp.py
 #   Codec encoding tests for Japanese encodings.
diff --git a/Lib/test/test_codecencodings_kr.py b/Lib/test/test_codecencodings_kr.py
--- a/Lib/test/test_codecencodings_kr.py
+++ b/Lib/test/test_codecencodings_kr.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #
 # test_codecencodings_kr.py
 #   Codec encoding tests for ROK encodings.
diff --git a/Lib/test/test_codecencodings_tw.py b/Lib/test/test_codecencodings_tw.py
--- a/Lib/test/test_codecencodings_tw.py
+++ b/Lib/test/test_codecencodings_tw.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #
 # test_codecencodings_tw.py
 #   Codec encoding tests for ROC encodings.
diff --git a/Lib/test/test_codecmaps_cn.py b/Lib/test/test_codecmaps_cn.py
--- a/Lib/test/test_codecmaps_cn.py
+++ b/Lib/test/test_codecmaps_cn.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #
 # test_codecmaps_cn.py
 #   Codec mapping tests for PRC encodings
diff --git a/Lib/test/test_codecmaps_hk.py b/Lib/test/test_codecmaps_hk.py
--- a/Lib/test/test_codecmaps_hk.py
+++ b/Lib/test/test_codecmaps_hk.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #
 # test_codecmaps_hk.py
 #   Codec mapping tests for HongKong encodings
diff --git a/Lib/test/test_codecmaps_jp.py b/Lib/test/test_codecmaps_jp.py
--- a/Lib/test/test_codecmaps_jp.py
+++ b/Lib/test/test_codecmaps_jp.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #
 # test_codecmaps_jp.py
 #   Codec mapping tests for Japanese encodings
diff --git a/Lib/test/test_codecmaps_kr.py b/Lib/test/test_codecmaps_kr.py
--- a/Lib/test/test_codecmaps_kr.py
+++ b/Lib/test/test_codecmaps_kr.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #
 # test_codecmaps_kr.py
 #   Codec mapping tests for ROK encodings
diff --git a/Lib/test/test_codecmaps_tw.py b/Lib/test/test_codecmaps_tw.py
--- a/Lib/test/test_codecmaps_tw.py
+++ b/Lib/test/test_codecmaps_tw.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #
 # test_codecmaps_tw.py
 #   Codec mapping tests for ROC encodings
diff --git a/Lib/test/test_dl.py b/Lib/test/test_dl.py
old mode 100755
new mode 100644
--- a/Lib/test/test_dl.py
+++ b/Lib/test/test_dl.py
@@ -1,4 +1,3 @@
-#! /usr/bin/env python
 """Test dlmodule.c
    Roger E. Masse  revised strategy by Barry Warsaw
 """
diff --git a/Lib/test/test_dumbdbm.py b/Lib/test/test_dumbdbm.py
--- a/Lib/test/test_dumbdbm.py
+++ b/Lib/test/test_dumbdbm.py
@@ -1,4 +1,3 @@
-#! /usr/bin/env python
 """Test script for the dumbdbm module
    Original by Roger E. Masse
 """
diff --git a/Lib/test/test_eof.py b/Lib/test/test_eof.py
--- a/Lib/test/test_eof.py
+++ b/Lib/test/test_eof.py
@@ -1,4 +1,3 @@
-#! /usr/bin/env python
 """test script for a few new invalid token catches"""
 
 import unittest
diff --git a/Lib/test/test_errno.py b/Lib/test/test_errno.py
old mode 100755
new mode 100644
--- a/Lib/test/test_errno.py
+++ b/Lib/test/test_errno.py
@@ -1,4 +1,3 @@
-#! /usr/bin/env python
 """Test the errno module
    Roger E. Masse
 """
diff --git a/Lib/test/test_gl.py b/Lib/test/test_gl.py
old mode 100755
new mode 100644
--- a/Lib/test/test_gl.py
+++ b/Lib/test/test_gl.py
@@ -1,4 +1,3 @@
-#! /usr/bin/env python
 """Very simple test script for the SGI gl library extension module
     taken mostly from the documentation.
     Roger E. Masse
diff --git a/Lib/test/test_gzip.py b/Lib/test/test_gzip.py
--- a/Lib/test/test_gzip.py
+++ b/Lib/test/test_gzip.py
@@ -1,4 +1,3 @@
-#! /usr/bin/env python
 """Test script for the gzip module.
 """
 
diff --git a/Lib/test/test_imageop.py b/Lib/test/test_imageop.py
old mode 100755
new mode 100644
--- a/Lib/test/test_imageop.py
+++ b/Lib/test/test_imageop.py
@@ -1,5 +1,3 @@
-#! /usr/bin/env python
-
 """Test script for the imageop module.  This has the side
    effect of partially testing the imgfile module as well.
    Roger E. Masse
diff --git a/Lib/test/test_imgfile.py b/Lib/test/test_imgfile.py
old mode 100755
new mode 100644
--- a/Lib/test/test_imgfile.py
+++ b/Lib/test/test_imgfile.py
@@ -1,5 +1,3 @@
-#! /usr/bin/env python
-
 """Simple test script for imgfile.c
    Roger E. Masse
 """
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -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
diff --git a/Lib/test/test_marshal.py b/Lib/test/test_marshal.py
--- a/Lib/test/test_marshal.py
+++ b/Lib/test/test_marshal.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 # -*- coding: iso-8859-1 -*-
 
 from test import test_support
diff --git a/Lib/test/test_multibytecodec.py b/Lib/test/test_multibytecodec.py
--- a/Lib/test/test_multibytecodec.py
+++ b/Lib/test/test_multibytecodec.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-#
 # test_multibytecodec.py
 #   Unit test for multibytecodec itself
 #
diff --git a/Lib/test/test_multibytecodec_support.py b/Lib/test/test_multibytecodec_support.py
--- a/Lib/test/test_multibytecodec_support.py
+++ b/Lib/test/test_multibytecodec_support.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-#
 # test_multibytecodec_support.py
 #   Common Unittest Routines for CJK codecs
 #
diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py
--- a/Lib/test/test_multiprocessing.py
+++ b/Lib/test/test_multiprocessing.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 #
 # Unit tests for the multiprocessing package
 #
diff --git a/Lib/test/test_popen.py b/Lib/test/test_popen.py
--- a/Lib/test/test_popen.py
+++ b/Lib/test/test_popen.py
@@ -1,4 +1,3 @@
-#! /usr/bin/env python
 """Basic tests for os.popen()
 
   Particularly useful for platforms that fake popen.
diff --git a/Lib/test/test_popen2.py b/Lib/test/test_popen2.py
--- a/Lib/test/test_popen2.py
+++ b/Lib/test/test_popen2.py
@@ -1,4 +1,3 @@
-#! /usr/bin/env python
 """Test script for popen2.py"""
 
 import warnings
diff --git a/Lib/test/test_random.py b/Lib/test/test_random.py
--- a/Lib/test/test_random.py
+++ b/Lib/test/test_random.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 import unittest
 import random
 import time
diff --git a/Lib/test/test_sets.py b/Lib/test/test_sets.py
--- a/Lib/test/test_sets.py
+++ b/Lib/test/test_sets.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 import unittest, operator, copy, pickle, random
 from test import test_support
 
diff --git a/Lib/test/test_smtpnet.py b/Lib/test/test_smtpnet.py
--- a/Lib/test/test_smtpnet.py
+++ b/Lib/test/test_smtpnet.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 import unittest
 from test import test_support
 import smtplib
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 import unittest
 from test import test_support
 
diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py
--- a/Lib/test/test_tcl.py
+++ b/Lib/test/test_tcl.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 import unittest
 import sys
 import os
diff --git a/Lib/test/test_urllib2_localnet.py b/Lib/test/test_urllib2_localnet.py
--- a/Lib/test/test_urllib2_localnet.py
+++ b/Lib/test/test_urllib2_localnet.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 import urlparse
 import urllib2
 import BaseHTTPServer
diff --git a/Lib/test/test_urllib2net.py b/Lib/test/test_urllib2net.py
--- a/Lib/test/test_urllib2net.py
+++ b/Lib/test/test_urllib2net.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 import unittest
 from test import test_support
 from test.test_urllib2 import sanepathname2url
diff --git a/Lib/test/test_urllibnet.py b/Lib/test/test_urllibnet.py
--- a/Lib/test/test_urllibnet.py
+++ b/Lib/test/test_urllibnet.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 import unittest
 from test import test_support
 
diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py
--- a/Lib/test/test_urlparse.py
+++ b/Lib/test/test_urlparse.py
@@ -1,5 +1,3 @@
-#! /usr/bin/env python
-
 from test import test_support
 import unittest
 import urlparse
diff --git a/Lib/test/test_userstring.py b/Lib/test/test_userstring.py
old mode 100755
new mode 100644
--- a/Lib/test/test_userstring.py
+++ b/Lib/test/test_userstring.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 # UserString is a wrapper around the native builtin string type.
 # UserString instances should behave similar to builtin string objects.
 
diff --git a/Lib/test/test_whichdb.py b/Lib/test/test_whichdb.py
--- a/Lib/test/test_whichdb.py
+++ b/Lib/test/test_whichdb.py
@@ -1,4 +1,3 @@
-#! /usr/bin/env python
 """Test script for the whichdb module
    based on test_anydbm.py
 """
diff --git a/Lib/test/test_with.py b/Lib/test/test_with.py
--- a/Lib/test/test_with.py
+++ b/Lib/test/test_with.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 """Unit tests for the with statement specified in PEP 343."""
 
 
diff --git a/Lib/timeit.py b/Lib/timeit.py
old mode 100644
new mode 100755
diff --git a/Lib/token.py b/Lib/token.py
old mode 100755
new mode 100644
--- a/Lib/token.py
+++ b/Lib/token.py
@@ -1,5 +1,3 @@
-#! /usr/bin/env python
-
 """Token constants (from "token.h")."""
 
 #  This file is automatically generated; please don't muck it up!
diff --git a/Lib/trace.py b/Lib/trace.py
old mode 100644
new mode 100755
diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py
old mode 100644
new mode 100755
diff --git a/Mac/Modules/carbonevt/_CarbonEvtmodule.c b/Mac/Modules/carbonevt/_CarbonEvtmodule.c
old mode 100755
new mode 100644
diff --git a/Mac/Modules/cg/CFMLateImport.c b/Mac/Modules/cg/CFMLateImport.c
old mode 100755
new mode 100644
diff --git a/Mac/Modules/cg/CFMLateImport.h b/Mac/Modules/cg/CFMLateImport.h
old mode 100755
new mode 100644
diff --git a/Mac/Modules/cg/CGStubLib.exp b/Mac/Modules/cg/CGStubLib.exp
old mode 100755
new mode 100644
diff --git a/Mac/Modules/cg/CGStubLib.readme b/Mac/Modules/cg/CGStubLib.readme
old mode 100755
new mode 100644
diff --git a/Mac/Modules/cg/_CGmodule.c b/Mac/Modules/cg/_CGmodule.c
old mode 100755
new mode 100644
diff --git a/Mac/PythonLauncher/FileSettings.h b/Mac/PythonLauncher/FileSettings.h
old mode 100755
new mode 100644
diff --git a/Mac/PythonLauncher/FileSettings.m b/Mac/PythonLauncher/FileSettings.m
old mode 100755
new mode 100644
diff --git a/Mac/PythonLauncher/MyDocument.h b/Mac/PythonLauncher/MyDocument.h
old mode 100755
new mode 100644
diff --git a/Mac/PythonLauncher/MyDocument.m b/Mac/PythonLauncher/MyDocument.m
old mode 100755
new mode 100644
diff --git a/Mac/PythonLauncher/main.m b/Mac/PythonLauncher/main.m
old mode 100755
new mode 100644
diff --git a/Mac/Tools/fixapplepython23.py b/Mac/Tools/fixapplepython23.py
old mode 100644
new mode 100755
diff --git a/Mac/scripts/buildpkg.py b/Mac/scripts/buildpkg.py
old mode 100644
new mode 100755
diff --git a/Mac/scripts/mkestrres-macerrors.h b/Mac/scripts/mkestrres-macerrors.h
old mode 100755
new mode 100644
diff --git a/Mac/scripts/zappycfiles.py b/Mac/scripts/zappycfiles.py
old mode 100644
new mode 100755
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -152,6 +152,14 @@
 - Issue #19286: Directories in ``package_data`` are no longer added to
   the filelist, preventing failure outlined in the ticket.
 
+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.
+
 IDLE
 ----
 
diff --git a/Modules/_ctypes/libffi/generate-ios-source-and-headers.py b/Modules/_ctypes/libffi/generate-ios-source-and-headers.py
old mode 100644
new mode 100755
diff --git a/Modules/_ctypes/libffi/generate-osx-source-and-headers.py b/Modules/_ctypes/libffi/generate-osx-source-and-headers.py
old mode 100644
new mode 100755
diff --git a/PC/msvcrtmodule.c b/PC/msvcrtmodule.c
old mode 100755
new mode 100644
diff --git a/Tools/gdb/libpython.py b/Tools/gdb/libpython.py
old mode 100644
new mode 100755
diff --git a/Tools/i18n/makelocalealias.py b/Tools/i18n/makelocalealias.py
old mode 100644
new mode 100755
diff --git a/Tools/pybench/Setup.py b/Tools/pybench/Setup.py
old mode 100644
new mode 100755
diff --git a/Tools/pybench/clockres.py b/Tools/pybench/clockres.py
old mode 100644
new mode 100755
diff --git a/Tools/pybench/systimes.py b/Tools/pybench/systimes.py
old mode 100644
new mode 100755
diff --git a/Tools/scripts/svneol.py b/Tools/scripts/svneol.py
old mode 100644
new mode 100755
diff --git a/Tools/ssl/get-remote-certificate.py b/Tools/ssl/get-remote-certificate.py
old mode 100644
new mode 100755
diff --git a/Tools/unicode/comparecodecs.py b/Tools/unicode/comparecodecs.py
old mode 100644
new mode 100755

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list