summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-01-16 15:33:23 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-01-16 15:33:23 (GMT)
commit8f8ec92de85b40b9e7bec81ae87f18cc3996c560 (patch)
tree4aaf0102840557e349731d720f3ca7fe690baa5c
parent5cacb84d836bd1f618702adaf0c6e704268f677d (diff)
parentaea79dd2c622a9b2a52e0b511e48ca86e0df9134 (diff)
downloadcpython-8f8ec92de85b40b9e7bec81ae87f18cc3996c560.zip
cpython-8f8ec92de85b40b9e7bec81ae87f18cc3996c560.tar.gz
cpython-8f8ec92de85b40b9e7bec81ae87f18cc3996c560.tar.bz2
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 lines in the unittestgui and checkpip scripts.
-rw-r--r--Lib/difflib.py2
-rw-r--r--Lib/http/cookies.py3
-rwxr-xr-x[-rw-r--r--]Lib/lib2to3/tests/data/different_encoding.py0
-rwxr-xr-x[-rw-r--r--]Lib/lib2to3/tests/data/false_encoding.py0
-rw-r--r--Lib/mailbox.py2
-rw-r--r--Lib/operator.py1
-rwxr-xr-x[-rw-r--r--]Lib/smtplib.py0
-rwxr-xr-x[-rw-r--r--]Lib/tarfile.py0
-rw-r--r--Lib/test/_test_multiprocessing.py2
-rwxr-xr-x[-rw-r--r--]Lib/test/crashers/recursive_call.py0
-rwxr-xr-x[-rw-r--r--]Lib/test/curses_tests.py0
-rw-r--r--Lib/test/multibytecodec_support.py1
-rw-r--r--[-rwxr-xr-x]Lib/test/ssltests.py0
-rw-r--r--Lib/test/test___future__.py1
-rw-r--r--[-rwxr-xr-x]Lib/test/test_array.py1
-rw-r--r--[-rwxr-xr-x]Lib/test/test_binhex.py1
-rw-r--r--Lib/test/test_bz2.py1
-rw-r--r--Lib/test/test_cmd.py1
-rw-r--r--Lib/test/test_codecencodings_cn.py1
-rw-r--r--Lib/test/test_codecencodings_hk.py1
-rw-r--r--Lib/test/test_codecencodings_iso2022.py2
-rw-r--r--Lib/test/test_codecencodings_jp.py1
-rw-r--r--Lib/test/test_codecencodings_kr.py1
-rw-r--r--Lib/test/test_codecencodings_tw.py1
-rw-r--r--Lib/test/test_codecmaps_cn.py1
-rw-r--r--Lib/test/test_codecmaps_hk.py1
-rw-r--r--Lib/test/test_codecmaps_jp.py1
-rw-r--r--Lib/test/test_codecmaps_kr.py1
-rw-r--r--Lib/test/test_codecmaps_tw.py1
-rw-r--r--Lib/test/test_dbm.py1
-rw-r--r--Lib/test/test_dbm_dumb.py1
-rw-r--r--Lib/test/test_eof.py1
-rw-r--r--[-rwxr-xr-x]Lib/test/test_errno.py1
-rw-r--r--Lib/test/test_gzip.py1
-rw-r--r--Lib/test/test_keywordonlyarg.py2
-rw-r--r--Lib/test/test_logging.py2
-rw-r--r--Lib/test/test_marshal.py2
-rw-r--r--Lib/test/test_multibytecodec.py1
-rw-r--r--[-rwxr-xr-x]Lib/test/test_pathlib.py0
-rw-r--r--Lib/test/test_popen.py1
-rw-r--r--Lib/test/test_random.py2
-rw-r--r--Lib/test/test_sched.py2
-rw-r--r--Lib/test/test_smtpnet.py2
-rw-r--r--Lib/test/test_socket.py2
-rw-r--r--Lib/test/test_support.py2
-rw-r--r--Lib/test/test_tcl.py2
-rw-r--r--Lib/test/test_urllib2_localnet.py2
-rw-r--r--Lib/test/test_urllib2net.py2
-rw-r--r--Lib/test/test_urllibnet.py2
-rw-r--r--[-rwxr-xr-x]Lib/test/test_urlparse.py2
-rw-r--r--[-rwxr-xr-x]Lib/test/test_userstring.py1
-rw-r--r--Lib/test/test_with.py2
-rw-r--r--Lib/test/test_xmlrpc_net.py2
-rwxr-xr-x[-rw-r--r--]Lib/timeit.py0
-rw-r--r--[-rwxr-xr-x]Lib/token.py0
-rwxr-xr-x[-rw-r--r--]Lib/trace.py0
-rwxr-xr-x[-rw-r--r--]Lib/turtledemo/bytedesign.py0
-rwxr-xr-x[-rw-r--r--]Lib/turtledemo/clock.py0
-rwxr-xr-x[-rw-r--r--]Lib/turtledemo/forest.py0
-rwxr-xr-x[-rw-r--r--]Lib/turtledemo/fractalcurves.py0
-rwxr-xr-x[-rw-r--r--]Lib/turtledemo/lindenmayer.py0
-rwxr-xr-x[-rw-r--r--]Lib/turtledemo/minimal_hanoi.py0
-rwxr-xr-x[-rw-r--r--]Lib/turtledemo/paint.py0
-rwxr-xr-x[-rw-r--r--]Lib/turtledemo/peace.py0
-rwxr-xr-x[-rw-r--r--]Lib/turtledemo/penrose.py0
-rwxr-xr-x[-rw-r--r--]Lib/turtledemo/planet_and_moon.py0
-rwxr-xr-x[-rw-r--r--]Lib/turtledemo/tree.py0
-rwxr-xr-x[-rw-r--r--]Lib/turtledemo/two_canvases.py0
-rwxr-xr-x[-rw-r--r--]Lib/turtledemo/yinyang.py0
-rwxr-xr-x[-rw-r--r--]Lib/webbrowser.py0
-rwxr-xr-x[-rw-r--r--]Mac/Tools/bundlebuilder.py0
-rwxr-xr-x[-rw-r--r--]Mac/Tools/plistlib_generate_testdata.py0
-rw-r--r--Misc/NEWS6
-rwxr-xr-x[-rw-r--r--]Modules/_ctypes/libffi/generate-ios-source-and-headers.py0
-rwxr-xr-x[-rw-r--r--]Modules/_ctypes/libffi/generate-osx-source-and-headers.py0
-rwxr-xr-x[-rw-r--r--]Modules/_decimal/tests/bench.py0
-rwxr-xr-x[-rw-r--r--]Modules/_decimal/tests/deccheck.py0
-rwxr-xr-x[-rw-r--r--]Objects/typeslots.py0
-rw-r--r--Tools/clinic/clinic_test.py2
-rwxr-xr-x[-rw-r--r--]Tools/gdb/libpython.py0
-rwxr-xr-x[-rw-r--r--]Tools/i18n/makelocalealias.py0
-rwxr-xr-x[-rw-r--r--]Tools/pybench/Setup.py0
-rwxr-xr-x[-rw-r--r--]Tools/pybench/clockres.py0
-rwxr-xr-x[-rw-r--r--]Tools/pybench/systimes.py0
-rw-r--r--[-rwxr-xr-x]Tools/scripts/analyze_dxp.py0
-rwxr-xr-x[-rw-r--r--]Tools/scripts/checkpip.py2
-rw-r--r--[-rwxr-xr-x]Tools/scripts/run_tests.py0
-rw-r--r--[-rwxr-xr-x]Tools/scripts/win_add2path.py0
-rwxr-xr-x[-rw-r--r--]Tools/ssl/make_ssl_data.py0
-rw-r--r--[-rwxr-xr-x]Tools/stringbench/stringbench.py0
-rwxr-xr-x[-rw-r--r--]Tools/unicode/comparecodecs.py0
-rwxr-xr-x[-rw-r--r--]Tools/unittestgui/unittestgui.py2
92 files changed, 8 insertions, 70 deletions
diff --git a/Lib/difflib.py b/Lib/difflib.py
index 159cbe4..e8a3621 100644
--- a/Lib/difflib.py
+++ b/Lib/difflib.py
@@ -1,5 +1,3 @@
-#! /usr/bin/env python3
-
"""
Module difflib -- helpers for computing deltas between objects.
diff --git a/Lib/http/cookies.py b/Lib/http/cookies.py
index dc3c74a..24da5f4 100644
--- a/Lib/http/cookies.py
+++ b/Lib/http/cookies.py
@@ -1,6 +1,3 @@
-#!/usr/bin/env python3
-#
-
####
# Copyright 2000 by Timothy O'Malley <timo@alum.mit.edu>
#
diff --git a/Lib/lib2to3/tests/data/different_encoding.py b/Lib/lib2to3/tests/data/different_encoding.py
index 9f32bd0..9f32bd0 100644..100755
--- a/Lib/lib2to3/tests/data/different_encoding.py
+++ b/Lib/lib2to3/tests/data/different_encoding.py
diff --git a/Lib/lib2to3/tests/data/false_encoding.py b/Lib/lib2to3/tests/data/false_encoding.py
index f4e59e7..f4e59e7 100644..100755
--- a/Lib/lib2to3/tests/data/false_encoding.py
+++ b/Lib/lib2to3/tests/data/false_encoding.py
diff --git a/Lib/mailbox.py b/Lib/mailbox.py
index 5f591bc..dde597c 100644
--- a/Lib/mailbox.py
+++ b/Lib/mailbox.py
@@ -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:
diff --git a/Lib/operator.py b/Lib/operator.py
index d31a9a4..b60349f 100644
--- a/Lib/operator.py
+++ b/Lib/operator.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
"""
Operator Interface
diff --git a/Lib/smtplib.py b/Lib/smtplib.py
index 796b866..796b866 100644..100755
--- a/Lib/smtplib.py
+++ b/Lib/smtplib.py
diff --git a/Lib/tarfile.py b/Lib/tarfile.py
index aec7009..aec7009 100644..100755
--- a/Lib/tarfile.py
+++ b/Lib/tarfile.py
diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py
index e439194..5cc767b 100644
--- a/Lib/test/_test_multiprocessing.py
+++ b/Lib/test/_test_multiprocessing.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python3
-
#
# Unit tests for the multiprocessing package
#
diff --git a/Lib/test/crashers/recursive_call.py b/Lib/test/crashers/recursive_call.py
index 2d160a7..2d160a7 100644..100755
--- a/Lib/test/crashers/recursive_call.py
+++ b/Lib/test/crashers/recursive_call.py
diff --git a/Lib/test/curses_tests.py b/Lib/test/curses_tests.py
index 40e832d..40e832d 100644..100755
--- a/Lib/test/curses_tests.py
+++ b/Lib/test/curses_tests.py
diff --git a/Lib/test/multibytecodec_support.py b/Lib/test/multibytecodec_support.py
index b93cc83..51ca3bd 100644
--- a/Lib/test/multibytecodec_support.py
+++ b/Lib/test/multibytecodec_support.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
#
# multibytecodec_support.py
# Common Unittest Routines for CJK codecs
diff --git a/Lib/test/ssltests.py b/Lib/test/ssltests.py
index 9b0ed22..9b0ed22 100755..100644
--- a/Lib/test/ssltests.py
+++ b/Lib/test/ssltests.py
diff --git a/Lib/test/test___future__.py b/Lib/test/test___future__.py
index 9ae4ce4..6f73c7f 100644
--- a/Lib/test/test___future__.py
+++ b/Lib/test/test___future__.py
@@ -1,4 +1,3 @@
-#! /usr/bin/env python3
import unittest
from test import support
import __future__
diff --git a/Lib/test/test_array.py b/Lib/test/test_array.py
index 9821a84..f8dbf06 100755..100644
--- a/Lib/test/test_array.py
+++ b/Lib/test/test_array.py
@@ -1,4 +1,3 @@
-#! /usr/bin/env python3
"""Test the arraymodule.
Roger E. Masse
"""
diff --git a/Lib/test/test_binhex.py b/Lib/test/test_binhex.py
index a807bca..9d4c85a 100755..100644
--- a/Lib/test/test_binhex.py
+++ b/Lib/test/test_binhex.py
@@ -1,4 +1,3 @@
-#! /usr/bin/env python3
"""Test script for the binhex C module
Uses the mechanism of the python binhex module
diff --git a/Lib/test/test_bz2.py b/Lib/test/test_bz2.py
index 26703f5..40d8425 100644
--- a/Lib/test/test_bz2.py
+++ b/Lib/test/test_bz2.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
from test import support
from test.support import bigmemtest, _4G
diff --git a/Lib/test/test_cmd.py b/Lib/test/test_cmd.py
index 6618535..e9a0211 100644
--- a/Lib/test/test_cmd.py
+++ b/Lib/test/test_cmd.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
"""
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
index b08c5fc..60e69eb 100644
--- a/Lib/test/test_codecencodings_cn.py
+++ b/Lib/test/test_codecencodings_cn.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
#
# 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
index 31363f4..25c05b6 100644
--- a/Lib/test/test_codecencodings_hk.py
+++ b/Lib/test/test_codecencodings_hk.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
#
# 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
index e4b2f30..8776864 100644
--- 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 support
diff --git a/Lib/test/test_codecencodings_jp.py b/Lib/test/test_codecencodings_jp.py
index 30c9e19..4091948 100644
--- a/Lib/test/test_codecencodings_jp.py
+++ b/Lib/test/test_codecencodings_jp.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
#
# 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
index 4dd6049..cd7696a 100644
--- a/Lib/test/test_codecencodings_kr.py
+++ b/Lib/test/test_codecencodings_kr.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
#
# 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
index 96245b7..ea6e1c1 100644
--- a/Lib/test/test_codecencodings_tw.py
+++ b/Lib/test/test_codecencodings_tw.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
#
# 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
index 1a761cf..76632a2 100644
--- a/Lib/test/test_codecmaps_cn.py
+++ b/Lib/test/test_codecmaps_cn.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
#
# 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
index 5f4e7c7..278ae2f 100644
--- a/Lib/test/test_codecmaps_hk.py
+++ b/Lib/test/test_codecmaps_hk.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
#
# 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
index 1fdbf63..fa93f12 100644
--- a/Lib/test/test_codecmaps_jp.py
+++ b/Lib/test/test_codecmaps_jp.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
#
# 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
index 0356402..e0bf716 100644
--- a/Lib/test/test_codecmaps_kr.py
+++ b/Lib/test/test_codecmaps_kr.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
#
# 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
index 44467e3..4d27080 100644
--- a/Lib/test/test_codecmaps_tw.py
+++ b/Lib/test/test_codecmaps_tw.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
#
# test_codecmaps_tw.py
# Codec mapping tests for ROC encodings
diff --git a/Lib/test/test_dbm.py b/Lib/test/test_dbm.py
index 1c57770..623d992 100644
--- a/Lib/test/test_dbm.py
+++ b/Lib/test/test_dbm.py
@@ -1,4 +1,3 @@
-#! /usr/bin/env python3
"""Test script for the dbm.open function based on testdumbdbm.py"""
import os
diff --git a/Lib/test/test_dbm_dumb.py b/Lib/test/test_dbm_dumb.py
index 9fd8cde..7601e64 100644
--- a/Lib/test/test_dbm_dumb.py
+++ b/Lib/test/test_dbm_dumb.py
@@ -1,4 +1,3 @@
-#! /usr/bin/env python3
"""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
index fb4ac9a..52e7932 100644
--- a/Lib/test/test_eof.py
+++ b/Lib/test/test_eof.py
@@ -1,4 +1,3 @@
-#! /usr/bin/env python3
"""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
index f414a87..058dcb9 100755..100644
--- a/Lib/test/test_errno.py
+++ b/Lib/test/test_errno.py
@@ -1,4 +1,3 @@
-#! /usr/bin/env python3
"""Test the errno module
Roger E. Masse
"""
diff --git a/Lib/test/test_gzip.py b/Lib/test/test_gzip.py
index aeafc65..5289407 100644
--- a/Lib/test/test_gzip.py
+++ b/Lib/test/test_gzip.py
@@ -1,4 +1,3 @@
-#! /usr/bin/env python3
"""Test script for the gzip module.
"""
diff --git a/Lib/test/test_keywordonlyarg.py b/Lib/test/test_keywordonlyarg.py
index e4a44c1..7f315d4 100644
--- a/Lib/test/test_keywordonlyarg.py
+++ b/Lib/test/test_keywordonlyarg.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python3
-
"""Unit tests for the keyword only argument specified in PEP 3102."""
__author__ = "Jiwon Seo"
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index 3fcc77a..e72b036 100644
--- 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
index e477c46..068c471 100644
--- a/Lib/test/test_marshal.py
+++ b/Lib/test/test_marshal.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python3
-
from test import support
import array
import io
diff --git a/Lib/test/test_multibytecodec.py b/Lib/test/test_multibytecodec.py
index 91148a6..ea592c7 100644
--- a/Lib/test/test_multibytecodec.py
+++ b/Lib/test/test_multibytecodec.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
#
# test_multibytecodec.py
# Unit test for multibytecodec itself
diff --git a/Lib/test/test_pathlib.py b/Lib/test/test_pathlib.py
index a54eef5..a54eef5 100755..100644
--- a/Lib/test/test_pathlib.py
+++ b/Lib/test/test_pathlib.py
diff --git a/Lib/test/test_popen.py b/Lib/test/test_popen.py
index accf187..225e41f 100644
--- a/Lib/test/test_popen.py
+++ b/Lib/test/test_popen.py
@@ -1,4 +1,3 @@
-#! /usr/bin/env python3
"""Basic tests for os.popen()
Particularly useful for platforms that fake popen.
diff --git a/Lib/test/test_random.py b/Lib/test/test_random.py
index 7d1a53a..37a222d 100644
--- a/Lib/test/test_random.py
+++ b/Lib/test/test_random.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python3
-
import unittest
import unittest.mock
import random
diff --git a/Lib/test/test_sched.py b/Lib/test/test_sched.py
index c6abf3d..fe8e785 100644
--- a/Lib/test/test_sched.py
+++ b/Lib/test/test_sched.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
import queue
import sched
import time
diff --git a/Lib/test/test_smtpnet.py b/Lib/test/test_smtpnet.py
index 56952ad..7f9db2d 100644
--- a/Lib/test/test_smtpnet.py
+++ b/Lib/test/test_smtpnet.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python3
-
import unittest
from test import support
import smtplib
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index 14e7e15..3be8a1f 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python3
-
import unittest
from test import support
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py
index 16b660b..70e6396 100644
--- a/Lib/test/test_support.py
+++ b/Lib/test/test_support.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
import importlib
import shutil
import sys
diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py
index 668db5d..2d304d1 100644
--- a/Lib/test/test_tcl.py
+++ b/Lib/test/test_tcl.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python3
-
import unittest
import sys
import os
diff --git a/Lib/test/test_urllib2_localnet.py b/Lib/test/test_urllib2_localnet.py
index 08250c3..83626f4 100644
--- a/Lib/test/test_urllib2_localnet.py
+++ b/Lib/test/test_urllib2_localnet.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python3
-
import os
import email
import urllib.parse
diff --git a/Lib/test/test_urllib2net.py b/Lib/test/test_urllib2net.py
index ab638ea..21ce3ab 100644
--- a/Lib/test/test_urllib2net.py
+++ b/Lib/test/test_urllib2net.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python3
-
import unittest
from test import support
from test.test_urllib2 import sanepathname2url
diff --git a/Lib/test/test_urllibnet.py b/Lib/test/test_urllibnet.py
index 7214a67..6347c54 100644
--- a/Lib/test/test_urllibnet.py
+++ b/Lib/test/test_urllibnet.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python3
-
import unittest
from test import support
diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py
index c938f09..19f67d3 100755..100644
--- a/Lib/test/test_urlparse.py
+++ b/Lib/test/test_urlparse.py
@@ -1,5 +1,3 @@
-#! /usr/bin/env python3
-
from test import support
import unittest
import urllib.parse
diff --git a/Lib/test/test_userstring.py b/Lib/test/test_userstring.py
index 71fcac2..34c629c 100755..100644
--- a/Lib/test/test_userstring.py
+++ b/Lib/test/test_userstring.py
@@ -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.
diff --git a/Lib/test/test_with.py b/Lib/test/test_with.py
index e8cc8c0..7068a80 100644
--- a/Lib/test/test_with.py
+++ b/Lib/test/test_with.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python3
-
"""Unit tests for the with statement specified in PEP 343."""
diff --git a/Lib/test/test_xmlrpc_net.py b/Lib/test/test_xmlrpc_net.py
index 4a3b64f..b60b82f 100644
--- a/Lib/test/test_xmlrpc_net.py
+++ b/Lib/test/test_xmlrpc_net.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python3
-
import collections.abc
import errno
import socket
diff --git a/Lib/timeit.py b/Lib/timeit.py
index ead2030..ead2030 100644..100755
--- a/Lib/timeit.py
+++ b/Lib/timeit.py
diff --git a/Lib/token.py b/Lib/token.py
index 7470c8c..7470c8c 100755..100644
--- a/Lib/token.py
+++ b/Lib/token.py
diff --git a/Lib/trace.py b/Lib/trace.py
index 09fe9ee..09fe9ee 100644..100755
--- a/Lib/trace.py
+++ b/Lib/trace.py
diff --git a/Lib/turtledemo/bytedesign.py b/Lib/turtledemo/bytedesign.py
index 64b1d7d..64b1d7d 100644..100755
--- a/Lib/turtledemo/bytedesign.py
+++ b/Lib/turtledemo/bytedesign.py
diff --git a/Lib/turtledemo/clock.py b/Lib/turtledemo/clock.py
index a0d157b..a0d157b 100644..100755
--- a/Lib/turtledemo/clock.py
+++ b/Lib/turtledemo/clock.py
diff --git a/Lib/turtledemo/forest.py b/Lib/turtledemo/forest.py
index a837d84..a837d84 100644..100755
--- a/Lib/turtledemo/forest.py
+++ b/Lib/turtledemo/forest.py
diff --git a/Lib/turtledemo/fractalcurves.py b/Lib/turtledemo/fractalcurves.py
index c49f8b8..c49f8b8 100644..100755
--- a/Lib/turtledemo/fractalcurves.py
+++ b/Lib/turtledemo/fractalcurves.py
diff --git a/Lib/turtledemo/lindenmayer.py b/Lib/turtledemo/lindenmayer.py
index 3925f25..3925f25 100644..100755
--- a/Lib/turtledemo/lindenmayer.py
+++ b/Lib/turtledemo/lindenmayer.py
diff --git a/Lib/turtledemo/minimal_hanoi.py b/Lib/turtledemo/minimal_hanoi.py
index cfb78dc..cfb78dc 100644..100755
--- a/Lib/turtledemo/minimal_hanoi.py
+++ b/Lib/turtledemo/minimal_hanoi.py
diff --git a/Lib/turtledemo/paint.py b/Lib/turtledemo/paint.py
index 68058ab..68058ab 100644..100755
--- a/Lib/turtledemo/paint.py
+++ b/Lib/turtledemo/paint.py
diff --git a/Lib/turtledemo/peace.py b/Lib/turtledemo/peace.py
index 63cf7cc..63cf7cc 100644..100755
--- a/Lib/turtledemo/peace.py
+++ b/Lib/turtledemo/peace.py
diff --git a/Lib/turtledemo/penrose.py b/Lib/turtledemo/penrose.py
index f73c864..f73c864 100644..100755
--- a/Lib/turtledemo/penrose.py
+++ b/Lib/turtledemo/penrose.py
diff --git a/Lib/turtledemo/planet_and_moon.py b/Lib/turtledemo/planet_and_moon.py
index 14c4bbc..14c4bbc 100644..100755
--- a/Lib/turtledemo/planet_and_moon.py
+++ b/Lib/turtledemo/planet_and_moon.py
diff --git a/Lib/turtledemo/tree.py b/Lib/turtledemo/tree.py
index 9c0b1f7..9c0b1f7 100644..100755
--- a/Lib/turtledemo/tree.py
+++ b/Lib/turtledemo/tree.py
diff --git a/Lib/turtledemo/two_canvases.py b/Lib/turtledemo/two_canvases.py
index 02d89db..02d89db 100644..100755
--- a/Lib/turtledemo/two_canvases.py
+++ b/Lib/turtledemo/two_canvases.py
diff --git a/Lib/turtledemo/yinyang.py b/Lib/turtledemo/yinyang.py
index 11d1f47..11d1f47 100644..100755
--- a/Lib/turtledemo/yinyang.py
+++ b/Lib/turtledemo/yinyang.py
diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py
index 9e47084..9e47084 100644..100755
--- a/Lib/webbrowser.py
+++ b/Lib/webbrowser.py
diff --git a/Mac/Tools/bundlebuilder.py b/Mac/Tools/bundlebuilder.py
index f5679d3..f5679d3 100644..100755
--- a/Mac/Tools/bundlebuilder.py
+++ b/Mac/Tools/bundlebuilder.py
diff --git a/Mac/Tools/plistlib_generate_testdata.py b/Mac/Tools/plistlib_generate_testdata.py
index 68d4d74..68d4d74 100644..100755
--- a/Mac/Tools/plistlib_generate_testdata.py
+++ b/Mac/Tools/plistlib_generate_testdata.py
diff --git a/Misc/NEWS b/Misc/NEWS
index f3ea917..8588c21 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -88,6 +88,12 @@ Tests
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 lines in the unittestgui and checkpip scripts.
+
- Issue #20268: Argument Clinic now supports cloning the parameters and
return converter of existing functions.
diff --git a/Modules/_ctypes/libffi/generate-ios-source-and-headers.py b/Modules/_ctypes/libffi/generate-ios-source-and-headers.py
index c2bca73..c2bca73 100644..100755
--- a/Modules/_ctypes/libffi/generate-ios-source-and-headers.py
+++ b/Modules/_ctypes/libffi/generate-ios-source-and-headers.py
diff --git a/Modules/_ctypes/libffi/generate-osx-source-and-headers.py b/Modules/_ctypes/libffi/generate-osx-source-and-headers.py
index 64313c1..64313c1 100644..100755
--- a/Modules/_ctypes/libffi/generate-osx-source-and-headers.py
+++ b/Modules/_ctypes/libffi/generate-osx-source-and-headers.py
diff --git a/Modules/_decimal/tests/bench.py b/Modules/_decimal/tests/bench.py
index 56566cc..56566cc 100644..100755
--- a/Modules/_decimal/tests/bench.py
+++ b/Modules/_decimal/tests/bench.py
diff --git a/Modules/_decimal/tests/deccheck.py b/Modules/_decimal/tests/deccheck.py
index c4c5a44..c4c5a44 100644..100755
--- a/Modules/_decimal/tests/deccheck.py
+++ b/Modules/_decimal/tests/deccheck.py
diff --git a/Objects/typeslots.py b/Objects/typeslots.py
index b24c7f4..b24c7f4 100644..100755
--- a/Objects/typeslots.py
+++ b/Objects/typeslots.py
diff --git a/Tools/clinic/clinic_test.py b/Tools/clinic/clinic_test.py
index e6c5c6c..27ff0cb 100644
--- a/Tools/clinic/clinic_test.py
+++ b/Tools/clinic/clinic_test.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python3
-#
# Argument Clinic
# Copyright 2012-2013 by Larry Hastings.
# Licensed to the PSF under a contributor agreement.
diff --git a/Tools/gdb/libpython.py b/Tools/gdb/libpython.py
index 2ad22e2..2ad22e2 100644..100755
--- a/Tools/gdb/libpython.py
+++ b/Tools/gdb/libpython.py
diff --git a/Tools/i18n/makelocalealias.py b/Tools/i18n/makelocalealias.py
index 10887ce..10887ce 100644..100755
--- a/Tools/i18n/makelocalealias.py
+++ b/Tools/i18n/makelocalealias.py
diff --git a/Tools/pybench/Setup.py b/Tools/pybench/Setup.py
index 21e654a..21e654a 100644..100755
--- a/Tools/pybench/Setup.py
+++ b/Tools/pybench/Setup.py
diff --git a/Tools/pybench/clockres.py b/Tools/pybench/clockres.py
index d7f1ac8..d7f1ac8 100644..100755
--- a/Tools/pybench/clockres.py
+++ b/Tools/pybench/clockres.py
diff --git a/Tools/pybench/systimes.py b/Tools/pybench/systimes.py
index 5e00891..5e00891 100644..100755
--- a/Tools/pybench/systimes.py
+++ b/Tools/pybench/systimes.py
diff --git a/Tools/scripts/analyze_dxp.py b/Tools/scripts/analyze_dxp.py
index bde931e..bde931e 100755..100644
--- a/Tools/scripts/analyze_dxp.py
+++ b/Tools/scripts/analyze_dxp.py
diff --git a/Tools/scripts/checkpip.py b/Tools/scripts/checkpip.py
index 835101e..8a64eda 100644..100755
--- a/Tools/scripts/checkpip.py
+++ b/Tools/scripts/checkpip.py
@@ -1,4 +1,4 @@
-#/usr/bin/env python3
+#!/usr/bin/env python3
"""
Checks that the version of the projects bundled in ensurepip are the latest
versions available.
diff --git a/Tools/scripts/run_tests.py b/Tools/scripts/run_tests.py
index e2a2050..e2a2050 100755..100644
--- a/Tools/scripts/run_tests.py
+++ b/Tools/scripts/run_tests.py
diff --git a/Tools/scripts/win_add2path.py b/Tools/scripts/win_add2path.py
index c85bea5..c85bea5 100755..100644
--- a/Tools/scripts/win_add2path.py
+++ b/Tools/scripts/win_add2path.py
diff --git a/Tools/ssl/make_ssl_data.py b/Tools/ssl/make_ssl_data.py
index 10244d1..10244d1 100644..100755
--- a/Tools/ssl/make_ssl_data.py
+++ b/Tools/ssl/make_ssl_data.py
diff --git a/Tools/stringbench/stringbench.py b/Tools/stringbench/stringbench.py
index 5abc25a..5abc25a 100755..100644
--- a/Tools/stringbench/stringbench.py
+++ b/Tools/stringbench/stringbench.py
diff --git a/Tools/unicode/comparecodecs.py b/Tools/unicode/comparecodecs.py
index 6525ddf..6525ddf 100644..100755
--- a/Tools/unicode/comparecodecs.py
+++ b/Tools/unicode/comparecodecs.py
diff --git a/Tools/unittestgui/unittestgui.py b/Tools/unittestgui/unittestgui.py
index 09a20e2..c3b5fa4 100644..100755
--- a/Tools/unittestgui/unittestgui.py
+++ b/Tools/unittestgui/unittestgui.py
@@ -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.