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.
This commit is contained in:
Serhiy Storchaka 2014-01-16 17:33:23 +02:00
commit 8f8ec92de8
92 changed files with 8 additions and 70 deletions

View File

@ -1,5 +1,3 @@
#! /usr/bin/env python3
""" """
Module difflib -- helpers for computing deltas between objects. Module difflib -- helpers for computing deltas between objects.

View File

@ -1,6 +1,3 @@
#!/usr/bin/env python3
#
#### ####
# Copyright 2000 by Timothy O'Malley <timo@alum.mit.edu> # Copyright 2000 by Timothy O'Malley <timo@alum.mit.edu>
# #

0
Lib/lib2to3/tests/data/different_encoding.py Normal file → Executable file
View File

0
Lib/lib2to3/tests/data/false_encoding.py Normal file → Executable file
View File

View File

@ -1,5 +1,3 @@
#! /usr/bin/env python3
"""Read/write support for Maildir, mbox, MH, Babyl, and MMDF mailboxes.""" """Read/write support for Maildir, mbox, MH, Babyl, and MMDF mailboxes."""
# Notes for authors of new mailbox subclasses: # Notes for authors of new mailbox subclasses:

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
""" """
Operator Interface Operator Interface

0
Lib/smtplib.py Normal file → Executable file
View File

0
Lib/tarfile.py Normal file → Executable file
View File

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
# #
# Unit tests for the multiprocessing package # Unit tests for the multiprocessing package
# #

0
Lib/test/crashers/recursive_call.py Normal file → Executable file
View File

0
Lib/test/curses_tests.py Normal file → Executable file
View File

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
# #
# multibytecodec_support.py # multibytecodec_support.py
# Common Unittest Routines for CJK codecs # Common Unittest Routines for CJK codecs

0
Lib/test/ssltests.py Executable file → Normal file
View File

View File

@ -1,4 +1,3 @@
#! /usr/bin/env python3
import unittest import unittest
from test import support from test import support
import __future__ import __future__

1
Lib/test/test_array.py Executable file → Normal file
View File

@ -1,4 +1,3 @@
#! /usr/bin/env python3
"""Test the arraymodule. """Test the arraymodule.
Roger E. Masse Roger E. Masse
""" """

1
Lib/test/test_binhex.py Executable file → Normal file
View File

@ -1,4 +1,3 @@
#! /usr/bin/env python3
"""Test script for the binhex C module """Test script for the binhex C module
Uses the mechanism of the python binhex module Uses the mechanism of the python binhex module

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
from test import support from test import support
from test.support import bigmemtest, _4G from test.support import bigmemtest, _4G

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
""" """
Test script for the 'cmd' module Test script for the 'cmd' module
Original by Michael Schneider Original by Michael Schneider

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
# #
# test_codecencodings_cn.py # test_codecencodings_cn.py
# Codec encoding tests for PRC encodings. # Codec encoding tests for PRC encodings.

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
# #
# test_codecencodings_hk.py # test_codecencodings_hk.py
# Codec encoding tests for HongKong encodings. # Codec encoding tests for HongKong encodings.

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python
#
# Codec encoding tests for ISO 2022 encodings. # Codec encoding tests for ISO 2022 encodings.
from test import support from test import support

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
# #
# test_codecencodings_jp.py # test_codecencodings_jp.py
# Codec encoding tests for Japanese encodings. # Codec encoding tests for Japanese encodings.

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
# #
# test_codecencodings_kr.py # test_codecencodings_kr.py
# Codec encoding tests for ROK encodings. # Codec encoding tests for ROK encodings.

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
# #
# test_codecencodings_tw.py # test_codecencodings_tw.py
# Codec encoding tests for ROC encodings. # Codec encoding tests for ROC encodings.

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
# #
# test_codecmaps_cn.py # test_codecmaps_cn.py
# Codec mapping tests for PRC encodings # Codec mapping tests for PRC encodings

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
# #
# test_codecmaps_hk.py # test_codecmaps_hk.py
# Codec mapping tests for HongKong encodings # Codec mapping tests for HongKong encodings

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
# #
# test_codecmaps_jp.py # test_codecmaps_jp.py
# Codec mapping tests for Japanese encodings # Codec mapping tests for Japanese encodings

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
# #
# test_codecmaps_kr.py # test_codecmaps_kr.py
# Codec mapping tests for ROK encodings # Codec mapping tests for ROK encodings

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
# #
# test_codecmaps_tw.py # test_codecmaps_tw.py
# Codec mapping tests for ROC encodings # Codec mapping tests for ROC encodings

View File

@ -1,4 +1,3 @@
#! /usr/bin/env python3
"""Test script for the dbm.open function based on testdumbdbm.py""" """Test script for the dbm.open function based on testdumbdbm.py"""
import os import os

View File

@ -1,4 +1,3 @@
#! /usr/bin/env python3
"""Test script for the dumbdbm module """Test script for the dumbdbm module
Original by Roger E. Masse Original by Roger E. Masse
""" """

View File

@ -1,4 +1,3 @@
#! /usr/bin/env python3
"""test script for a few new invalid token catches""" """test script for a few new invalid token catches"""
import unittest import unittest

1
Lib/test/test_errno.py Executable file → Normal file
View File

@ -1,4 +1,3 @@
#! /usr/bin/env python3
"""Test the errno module """Test the errno module
Roger E. Masse Roger E. Masse
""" """

View File

@ -1,4 +1,3 @@
#! /usr/bin/env python3
"""Test script for the gzip module. """Test script for the gzip module.
""" """

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
"""Unit tests for the keyword only argument specified in PEP 3102.""" """Unit tests for the keyword only argument specified in PEP 3102."""
__author__ = "Jiwon Seo" __author__ = "Jiwon Seo"

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python
#
# Copyright 2001-2013 by Vinay Sajip. All Rights Reserved. # Copyright 2001-2013 by Vinay Sajip. All Rights Reserved.
# #
# Permission to use, copy, modify, and distribute this software and its # Permission to use, copy, modify, and distribute this software and its

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from test import support from test import support
import array import array
import io import io

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
# #
# test_multibytecodec.py # test_multibytecodec.py
# Unit test for multibytecodec itself # Unit test for multibytecodec itself

0
Lib/test/test_pathlib.py Executable file → Normal file
View File

View File

@ -1,4 +1,3 @@
#! /usr/bin/env python3
"""Basic tests for os.popen() """Basic tests for os.popen()
Particularly useful for platforms that fake popen. Particularly useful for platforms that fake popen.

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import unittest import unittest
import unittest.mock import unittest.mock
import random import random

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python
import queue import queue
import sched import sched
import time import time

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import unittest import unittest
from test import support from test import support
import smtplib import smtplib

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import unittest import unittest
from test import support from test import support

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python
import importlib import importlib
import shutil import shutil
import sys import sys

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import unittest import unittest
import sys import sys
import os import os

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import os import os
import email import email
import urllib.parse import urllib.parse

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import unittest import unittest
from test import support from test import support
from test.test_urllib2 import sanepathname2url from test.test_urllib2 import sanepathname2url

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import unittest import unittest
from test import support from test import support

2
Lib/test/test_urlparse.py Executable file → Normal file
View File

@ -1,5 +1,3 @@
#! /usr/bin/env python3
from test import support from test import support
import unittest import unittest
import urllib.parse import urllib.parse

1
Lib/test/test_userstring.py Executable file → Normal file
View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
# UserString is a wrapper around the native builtin string type. # UserString is a wrapper around the native builtin string type.
# UserString instances should behave similar to builtin string objects. # UserString instances should behave similar to builtin string objects.

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
"""Unit tests for the with statement specified in PEP 343.""" """Unit tests for the with statement specified in PEP 343."""

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import collections.abc import collections.abc
import errno import errno
import socket import socket

0
Lib/timeit.py Normal file → Executable file
View File

0
Lib/token.py Executable file → Normal file
View File

0
Lib/trace.py Normal file → Executable file
View File

0
Lib/turtledemo/bytedesign.py Normal file → Executable file
View File

0
Lib/turtledemo/clock.py Normal file → Executable file
View File

0
Lib/turtledemo/forest.py Normal file → Executable file
View File

0
Lib/turtledemo/fractalcurves.py Normal file → Executable file
View File

0
Lib/turtledemo/lindenmayer.py Normal file → Executable file
View File

0
Lib/turtledemo/minimal_hanoi.py Normal file → Executable file
View File

0
Lib/turtledemo/paint.py Normal file → Executable file
View File

0
Lib/turtledemo/peace.py Normal file → Executable file
View File

0
Lib/turtledemo/penrose.py Normal file → Executable file
View File

0
Lib/turtledemo/planet_and_moon.py Normal file → Executable file
View File

0
Lib/turtledemo/tree.py Normal file → Executable file
View File

0
Lib/turtledemo/two_canvases.py Normal file → Executable file
View File

0
Lib/turtledemo/yinyang.py Normal file → Executable file
View File

0
Lib/webbrowser.py Normal file → Executable file
View File

0
Mac/Tools/bundlebuilder.py Normal file → Executable file
View File

0
Mac/Tools/plistlib_generate_testdata.py Normal file → Executable file
View File

View File

@ -88,6 +88,12 @@ Tests
Tools/Demos 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 - Issue #20268: Argument Clinic now supports cloning the parameters and
return converter of existing functions. return converter of existing functions.

View File

View File

0
Modules/_decimal/tests/bench.py Normal file → Executable file
View File

0
Modules/_decimal/tests/deccheck.py Normal file → Executable file
View File

0
Objects/typeslots.py Normal file → Executable file
View File

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# Argument Clinic # Argument Clinic
# Copyright 2012-2013 by Larry Hastings. # Copyright 2012-2013 by Larry Hastings.
# Licensed to the PSF under a contributor agreement. # Licensed to the PSF under a contributor agreement.

0
Tools/gdb/libpython.py Normal file → Executable file
View File

0
Tools/i18n/makelocalealias.py Normal file → Executable file
View File

0
Tools/pybench/Setup.py Normal file → Executable file
View File

0
Tools/pybench/clockres.py Normal file → Executable file
View File

0
Tools/pybench/systimes.py Normal file → Executable file
View File

0
Tools/scripts/analyze_dxp.py Executable file → Normal file
View File

2
Tools/scripts/checkpip.py Normal file → Executable file
View File

@ -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 Checks that the version of the projects bundled in ensurepip are the latest
versions available. versions available.

0
Tools/scripts/run_tests.py Executable file → Normal file
View File

0
Tools/scripts/win_add2path.py Executable file → Normal file
View File

0
Tools/ssl/make_ssl_data.py Normal file → Executable file
View File

0
Tools/stringbench/stringbench.py Executable file → Normal file
View File

0
Tools/unicode/comparecodecs.py Normal file → Executable file
View File

2
Tools/unittestgui/unittestgui.py Normal file → Executable file
View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
""" """
GUI framework and application for use with Python unit testing framework. GUI framework and application for use with Python unit testing framework.
Execute tests written using the framework provided by the 'unittest' module. Execute tests written using the framework provided by the 'unittest' module.