From c8b45a385ab85c3f3463b1e7394c515e892dfba7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" <jaraco@jaraco.com> Date: Wed, 29 May 2024 12:43:19 -0400 Subject: gh-118673: Remove shebang and executable bits from stdlib modules. (#119658) * gh-118673: Remove shebang and executable bits from stdlib modules. * Removed shebangs and exe bits on turtledemo scripts. The setting was inappropriate for '__main__' and inconsistent across the other modules. The scripts can still be executed directly by invoking with the desired interpreter. --- Lib/base64.py | 2 -- Lib/cProfile.py | 2 -- Lib/pdb.py | 2 -- Lib/platform.py | 2 -- Lib/profile.py | 1 - Lib/pydoc.py | 1 - Lib/quopri.py | 2 -- Lib/smtplib.py | 2 -- Lib/tabnanny.py | 2 -- Lib/tarfile.py | 1 - Lib/timeit.py | 2 -- Lib/trace.py | 2 -- Lib/turtledemo/__main__.py | 2 -- Lib/turtledemo/bytedesign.py | 1 - Lib/turtledemo/clock.py | 1 - Lib/turtledemo/forest.py | 1 - Lib/turtledemo/fractalcurves.py | 1 - Lib/turtledemo/lindenmayer.py | 1 - Lib/turtledemo/minimal_hanoi.py | 1 - Lib/turtledemo/paint.py | 1 - Lib/turtledemo/peace.py | 1 - Lib/turtledemo/penrose.py | 1 - Lib/turtledemo/planet_and_moon.py | 1 - Lib/turtledemo/sorting_animate.py | 1 - Lib/turtledemo/tree.py | 1 - Lib/turtledemo/yinyang.py | 1 - Lib/webbrowser.py | 1 - Misc/NEWS.d/next/Library/2024-05-06-17-39-52.gh-issue-118673.sTXBit.rst | 1 + 28 files changed, 1 insertion(+), 37 deletions(-) mode change 100755 => 100644 Lib/base64.py mode change 100755 => 100644 Lib/cProfile.py mode change 100755 => 100644 Lib/pdb.py mode change 100755 => 100644 Lib/platform.py mode change 100755 => 100644 Lib/profile.py mode change 100755 => 100644 Lib/pydoc.py mode change 100755 => 100644 Lib/quopri.py mode change 100755 => 100644 Lib/smtplib.py mode change 100755 => 100644 Lib/tabnanny.py mode change 100755 => 100644 Lib/tarfile.py mode change 100755 => 100644 Lib/timeit.py mode change 100755 => 100644 Lib/trace.py mode change 100755 => 100644 Lib/turtledemo/__main__.py mode change 100755 => 100644 Lib/turtledemo/bytedesign.py mode change 100755 => 100644 Lib/turtledemo/clock.py mode change 100755 => 100644 Lib/turtledemo/forest.py mode change 100755 => 100644 Lib/turtledemo/fractalcurves.py mode change 100755 => 100644 Lib/turtledemo/lindenmayer.py mode change 100755 => 100644 Lib/turtledemo/minimal_hanoi.py mode change 100755 => 100644 Lib/turtledemo/paint.py mode change 100755 => 100644 Lib/turtledemo/peace.py mode change 100755 => 100644 Lib/turtledemo/penrose.py mode change 100755 => 100644 Lib/turtledemo/planet_and_moon.py mode change 100755 => 100644 Lib/turtledemo/sorting_animate.py mode change 100755 => 100644 Lib/turtledemo/tree.py mode change 100755 => 100644 Lib/turtledemo/yinyang.py mode change 100755 => 100644 Lib/webbrowser.py create mode 100644 Misc/NEWS.d/next/Library/2024-05-06-17-39-52.gh-issue-118673.sTXBit.rst diff --git a/Lib/base64.py b/Lib/base64.py old mode 100755 new mode 100644 index 5a7e790..61be4fb --- a/Lib/base64.py +++ b/Lib/base64.py @@ -1,5 +1,3 @@ -#! /usr/bin/env python3 - """Base16, Base32, Base64 (RFC 3548), Base85 and Ascii85 data encodings""" # Modified 04-Oct-1995 by Jack Jansen to use binascii module diff --git a/Lib/cProfile.py b/Lib/cProfile.py old mode 100755 new mode 100644 index 9c13237..e7c868b --- a/Lib/cProfile.py +++ b/Lib/cProfile.py @@ -1,5 +1,3 @@ -#! /usr/bin/env python3 - """Python interface for the 'lsprof' profiler. Compatible with the 'profile' module. """ diff --git a/Lib/pdb.py b/Lib/pdb.py old mode 100755 new mode 100644 index 0f791d7..ba84a29 --- a/Lib/pdb.py +++ b/Lib/pdb.py @@ -1,5 +1,3 @@ -#! /usr/bin/env python3 - """ The Python Debugger Pdb ======================= diff --git a/Lib/platform.py b/Lib/platform.py old mode 100755 new mode 100644 index 5958382..a4fd246 --- a/Lib/platform.py +++ b/Lib/platform.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ This module tries to retrieve as much platform-identifying data as possible. It makes this information available via function APIs. diff --git a/Lib/profile.py b/Lib/profile.py old mode 100755 new mode 100644 index f2f8c2f..a5afb12 --- a/Lib/profile.py +++ b/Lib/profile.py @@ -1,4 +1,3 @@ -#! /usr/bin/env python3 # # Class for profiling python code. rev 1.0 6/2/94 # diff --git a/Lib/pydoc.py b/Lib/pydoc.py old mode 100755 new mode 100644 index 55ccf21..5d854c5 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 """Generate Python documentation in HTML or text for interactive use. At the Python interactive prompt, calling help(thing) on a Python object diff --git a/Lib/quopri.py b/Lib/quopri.py old mode 100755 new mode 100644 index f36cf7b..129fd2f --- a/Lib/quopri.py +++ b/Lib/quopri.py @@ -1,5 +1,3 @@ -#! /usr/bin/env python3 - """Conversions to/from quoted-printable transport encoding as per RFC 1521.""" # (Dec 1991 version). diff --git a/Lib/smtplib.py b/Lib/smtplib.py old mode 100755 new mode 100644 index 75163f7..84d6d85 --- a/Lib/smtplib.py +++ b/Lib/smtplib.py @@ -1,5 +1,3 @@ -#! /usr/bin/env python3 - '''SMTP/ESMTP client class. This should follow RFC 821 (SMTP), RFC 1869 (ESMTP), RFC 2554 (SMTP diff --git a/Lib/tabnanny.py b/Lib/tabnanny.py old mode 100755 new mode 100644 index e2ac683..7e56d4a --- a/Lib/tabnanny.py +++ b/Lib/tabnanny.py @@ -1,5 +1,3 @@ -#! /usr/bin/env python3 - """The Tab Nanny despises ambiguous indentation. She knows no mercy. tabnanny -- Detection of ambiguous indentation diff --git a/Lib/tarfile.py b/Lib/tarfile.py old mode 100755 new mode 100644 index f817b57..d5d8a46 --- a/Lib/tarfile.py +++ b/Lib/tarfile.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 #------------------------------------------------------------------- # tarfile.py #------------------------------------------------------------------- diff --git a/Lib/timeit.py b/Lib/timeit.py old mode 100755 new mode 100644 index 02cfafa..c106e0f --- a/Lib/timeit.py +++ b/Lib/timeit.py @@ -1,5 +1,3 @@ -#! /usr/bin/env python3 - """Tool for measuring execution time of small code snippets. This module avoids a number of common traps for measuring execution diff --git a/Lib/trace.py b/Lib/trace.py old mode 100755 new mode 100644 index 8550475..bb3d34f --- a/Lib/trace.py +++ b/Lib/trace.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - # portions copyright 2001, Autonomous Zones Industries, Inc., all rights... # err... reserved and offered to the public under the terms of the # Python 2.2 license. diff --git a/Lib/turtledemo/__main__.py b/Lib/turtledemo/__main__.py old mode 100755 new mode 100644 index 731f98b..06a6408 --- a/Lib/turtledemo/__main__.py +++ b/Lib/turtledemo/__main__.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ ---------------------------------------------- turtleDemo - Help diff --git a/Lib/turtledemo/bytedesign.py b/Lib/turtledemo/bytedesign.py old mode 100755 new mode 100644 index 1b7452b..476cdaa --- a/Lib/turtledemo/bytedesign.py +++ b/Lib/turtledemo/bytedesign.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 """ turtle-example-suite: tdemo_bytedesign.py diff --git a/Lib/turtledemo/clock.py b/Lib/turtledemo/clock.py old mode 100755 new mode 100644 index 9f8585b..fd3b399 --- a/Lib/turtledemo/clock.py +++ b/Lib/turtledemo/clock.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 # -*- coding: cp1252 -*- """ turtle-example-suite: diff --git a/Lib/turtledemo/forest.py b/Lib/turtledemo/forest.py old mode 100755 new mode 100644 index 55b7da9..cac5532 --- a/Lib/turtledemo/forest.py +++ b/Lib/turtledemo/forest.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 """ turtlegraphics-example-suite: tdemo_forest.py diff --git a/Lib/turtledemo/fractalcurves.py b/Lib/turtledemo/fractalcurves.py old mode 100755 new mode 100644 index 54ade96..fda193e --- a/Lib/turtledemo/fractalcurves.py +++ b/Lib/turtledemo/fractalcurves.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 """ turtle-example-suite: tdemo_fractalCurves.py diff --git a/Lib/turtledemo/lindenmayer.py b/Lib/turtledemo/lindenmayer.py old mode 100755 new mode 100644 index 3925f25..7c7a847 --- a/Lib/turtledemo/lindenmayer.py +++ b/Lib/turtledemo/lindenmayer.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 """ turtle-example-suite: xtx_lindenmayer_indian.py diff --git a/Lib/turtledemo/minimal_hanoi.py b/Lib/turtledemo/minimal_hanoi.py old mode 100755 new mode 100644 index 4a432f2..08d8b63 --- a/Lib/turtledemo/minimal_hanoi.py +++ b/Lib/turtledemo/minimal_hanoi.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 """ turtle-example-suite: tdemo_minimal_hanoi.py diff --git a/Lib/turtledemo/paint.py b/Lib/turtledemo/paint.py old mode 100755 new mode 100644 index fc6852a..6e63d00 --- a/Lib/turtledemo/paint.py +++ b/Lib/turtledemo/paint.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 """ turtle-example-suite: tdemo_paint.py diff --git a/Lib/turtledemo/peace.py b/Lib/turtledemo/peace.py old mode 100755 new mode 100644 index e2ba928..fd6abe3 --- a/Lib/turtledemo/peace.py +++ b/Lib/turtledemo/peace.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 """ turtle-example-suite: tdemo_peace.py diff --git a/Lib/turtledemo/penrose.py b/Lib/turtledemo/penrose.py old mode 100755 new mode 100644 index 045722a..ac12c89 --- a/Lib/turtledemo/penrose.py +++ b/Lib/turtledemo/penrose.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 """ xturtle-example-suite: xtx_kites_and_darts.py diff --git a/Lib/turtledemo/planet_and_moon.py b/Lib/turtledemo/planet_and_moon.py old mode 100755 new mode 100644 index 021ff99..c0e2c5b --- a/Lib/turtledemo/planet_and_moon.py +++ b/Lib/turtledemo/planet_and_moon.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 """ turtle-example-suite: tdemo_planets_and_moon.py diff --git a/Lib/turtledemo/sorting_animate.py b/Lib/turtledemo/sorting_animate.py old mode 100755 new mode 100644 index d25a0ab..55735cd --- a/Lib/turtledemo/sorting_animate.py +++ b/Lib/turtledemo/sorting_animate.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 """ sorting_animation.py diff --git a/Lib/turtledemo/tree.py b/Lib/turtledemo/tree.py old mode 100755 new mode 100644 index 98a20da..12729e2 --- a/Lib/turtledemo/tree.py +++ b/Lib/turtledemo/tree.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 """ turtle-example-suite: tdemo_tree.py diff --git a/Lib/turtledemo/yinyang.py b/Lib/turtledemo/yinyang.py old mode 100755 new mode 100644 index 11d1f47..791060d --- a/Lib/turtledemo/yinyang.py +++ b/Lib/turtledemo/yinyang.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 """ turtle-example-suite: tdemo_yinyang.py diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py old mode 100755 new mode 100644 index b7fbc41..6fca257 --- a/Lib/webbrowser.py +++ b/Lib/webbrowser.py @@ -1,4 +1,3 @@ -#! /usr/bin/env python3 """Interfaces for launching and remotely controlling web browsers.""" # Maintained by Georg Brandl. diff --git a/Misc/NEWS.d/next/Library/2024-05-06-17-39-52.gh-issue-118673.sTXBit.rst b/Misc/NEWS.d/next/Library/2024-05-06-17-39-52.gh-issue-118673.sTXBit.rst new file mode 100644 index 0000000..f0a87d2 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2024-05-06-17-39-52.gh-issue-118673.sTXBit.rst @@ -0,0 +1 @@ +Removed executable bits and shebang from stdlib modules. -- cgit v0.12