[issue19936] Executable permissions of Python source files
Roundup Robot added the comment: New changeset 1cfce469642d by Serhiy Storchaka in branch '3.3': Issue #19936: Restored executable bits for several libffi files. http://hg.python.org/cpython/rev/1cfce469642d New changeset 9adce4e25bdb by Serhiy Storchaka in branch 'default': Issue #19936: Restored executable bits for several libffi files. http://hg.python.org/cpython/rev/9adce4e25bdb -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19936 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19936] Executable permissions of Python source files
Serhiy Storchaka added the comment: Now findnoshebang.py shows only example files in the documentation, Windows-specific bat and pyw files, generated files, and the Modules/_ctypes/libffi/ltmain.sh file. I have not touched ltmain.sh file which have no shebang nor executable bits in the libffi distribution, because I'm not sure this is safe. Thanks all for reviews. -- resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19936 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19936] Executable permissions of Python source files
Serhiy Storchaka added the comment: Gregory, is it intentional that Modules/_ctypes/libffi/build-ios.sh, Modules/_ctypes/libffi/libtool-ldflags, Modules/_ctypes/libffi/msvcc.sh and Modules/_ctypes/libffi/src/arm/gentramp.sh have no executable bits? They all have executable bits in mainstream libffi-3.0.13 distribution. -- nosy: +gregory.p.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19936 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19936] Executable permissions of Python source files
Gregory P. Smith added the comment: For those four libffi files in msg208964, do what you want with them. I ignored executable bits entirely (didn't set or unset) when importing the code as there is zero need to execute any of them. IMNSHO, I think executable bits should _not_ be set on most files in the Python source tree. *Especially* not on things under Lib and Lib/test/. Afterall, any #! on those is *guaranteed* to not refer to the Python interpreter the source tree represents. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19936 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19936] Executable permissions of Python source files
Serhiy Storchaka added the comment: Left files with mismatched executable bits and shebangs: Python 3.4: - ./Doc/includes/email-unpack.py - ./Doc/includes/email-alternative.py - ./Doc/includes/email-dir.py x ./Tools/scripts/pydocgui.pyw x ./Lib/idlelib/idle.bat - ./Modules/_ctypes/libffi/build-ios.sh x ./Modules/_ctypes/libffi/ltmain.sh - ./Modules/_ctypes/libffi/msvcc.sh - ./Modules/_ctypes/libffi/src/arm/gentramp.sh x ./Modules/_decimal/tests/runall.bat Python 3.3: - ./Doc/includes/email-unpack.py - ./Doc/includes/email-alternative.py - ./Doc/includes/email-dir.py x ./Lib/idlelib/idle.bat - ./Modules/_ctypes/libffi/build-ios.sh x ./Modules/_ctypes/libffi/ltmain.sh - ./Modules/_ctypes/libffi/msvcc.sh - ./Modules/_ctypes/libffi/src/arm/gentramp.sh x ./Modules/_decimal/tests/runall.bat x ./PC/VS7.1/rt.bat x ./PC/VC6/rt.bat Python 2.7: - ./Doc/includes/email-unpack.py - ./Doc/includes/email-alternative.py - ./Doc/includes/email-dir.py x ./Demo/rpc/test x ./Lib/idlelib/idle.bat x ./PC/VS7.1/rt.bat x ./PC/VC6/rt.bat -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19936 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19936] Executable permissions of Python source files
Stefan Krah added the comment: IMO the .bat files should have the executable bit as a reminder that they're executable on Windows. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19936 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19936] Executable permissions of Python source files
Matthias Klose added the comment: I like this, and I'm doing this in the Debian/Ubuntu packaging anyway. But I would like to see some check script which maybe can be run before a release, that points out regressions or wrong permissions for newly introduced files. -- nosy: +doko ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19936 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19936] Executable permissions of Python source files
Roundup Robot added the comment: New changeset 9062a8695c89 by Stefan Krah in branch '3.3': Issue #19936: Disable shebang lines in order to prevent using a random http://hg.python.org/cpython/rev/9062a8695c89 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19936 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19936] Executable permissions of Python source files
Serhiy Storchaka added the comment: Here is a script. It lists text files with executable bits and without shebangs and files with .py, .pyw, or .sh suffix which have shebang but have not with executable bits. As far as it searches not only Python files, now it found such files: - ./python-gdb.py - ./Doc/includes/email-unpack.py - ./Doc/includes/email-alternative.py - ./Doc/includes/email-dir.py - ./Misc/python-config.sh x ./Mac/PythonLauncher/MyDocument.m x ./Mac/PythonLauncher/MyDocument.h x ./Mac/PythonLauncher/FileSettings.m x ./Mac/PythonLauncher/main.m x ./Mac/PythonLauncher/FileSettings.h - ./Tools/test2to3/maintest.py x ./Tools/scripts/pydocgui.pyw x ./Lib/idlelib/idle.bat - ./Modules/_ctypes/libffi/build-ios.sh x ./Modules/_ctypes/libffi/ltmain.sh - ./Modules/_ctypes/libffi/msvcc.sh - ./Modules/_ctypes/libffi/src/arm/gentramp.sh x ./Modules/_decimal/tests/deccheck.py x ./Modules/_decimal/tests/runall.bat x ./Modules/_decimal/tests/bench.py x ./PC/msvcrtmodule.c -- Added file: http://bugs.python.org/file33498/findnoshebang.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19936 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19936] Executable permissions of Python source files
Roundup Robot added the comment: New changeset 92fd0df03823 by Serhiy Storchaka in branch '3.3': Issue #19936: Added executable bits or shebang lines to Python scripts which http://hg.python.org/cpython/rev/92fd0df03823 New changeset 83009d70bc9c by Serhiy Storchaka in branch 'default': Issue #19936: Added executable bits or shebang lines to Python scripts which http://hg.python.org/cpython/rev/83009d70bc9c -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19936 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19936] Executable permissions of Python source files
Roundup Robot added the comment: New changeset 085a0ea2015f by Serhiy Storchaka in branch '3.3': Issue #19936: Remove executable bits from C source files and several forgotten http://hg.python.org/cpython/rev/085a0ea2015f New changeset 6baeee39195b by Serhiy Storchaka in branch 'default': Issue #19936: Remove executable bits from C source files and several forgotten http://hg.python.org/cpython/rev/6baeee39195b -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19936 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19936] Executable permissions of Python source files
Roundup Robot added the comment: New changeset 334116bb2939 by Serhiy Storchaka in branch '2.7': Issue #19936: Added executable bits or shebang lines to Python scripts which http://hg.python.org/cpython/rev/334116bb2939 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19936 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19936] Executable permissions of Python source files
Stefan Krah added the comment: Somehow Modules/_decimal/tests/bench.py and Modules/_decimal/tests/deccheck.py are now executable, which (I think) they should not be. -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19936 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19936] Executable permissions of Python source files
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19936 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19936] Executable permissions of Python source files
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19936 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19936] Executable permissions of Python source files
New submission from Serhiy Storchaka: Following files have executable permission bit but have no shebang (#!): Lib/test/ssltests.py Lib/test/test_pathlib.py Lib/token.py Tools/scripts/analyze_dxp.py Tools/scripts/run_tests.py Tools/scripts/win_add2path.py Tools/stringbench/stringbench.py I think executable bit should be cleared on them, because they can't be ran without correct shebang. Following files have shebang but have no executable permission bit: Doc/includes/email-alternative.py Doc/includes/email-dir.py Doc/includes/email-unpack.py Lib/difflib.py Lib/http/cookies.py Lib/idlelib/PyShell.py Lib/lib2to3/tests/data/different_encoding.py Lib/lib2to3/tests/data/false_encoding.py Lib/mailbox.py Lib/operator.py Lib/smtplib.py Lib/tarfile.py Lib/test/_test_multiprocessing.py Lib/test/crashers/recursive_call.py Lib/test/curses_tests.py Lib/test/multibytecodec_support.py Lib/test/test___future__.py 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_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_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_with.py Lib/test/test_xmlrpc_net.py Lib/timeit.py Lib/trace.py Lib/turtledemo/bytedesign.py Lib/turtledemo/clock.py Lib/turtledemo/forest.py Lib/turtledemo/fractalcurves.py Lib/turtledemo/lindenmayer.py Lib/turtledemo/minimal_hanoi.py Lib/turtledemo/paint.py Lib/turtledemo/peace.py Lib/turtledemo/penrose.py Lib/turtledemo/planet_and_moon.py Lib/turtledemo/tree.py Lib/turtledemo/two_canvases.py Lib/turtledemo/yinyang.py Lib/webbrowser.py Mac/Tools/bundlebuilder.py Mac/Tools/plistlib_generate_testdata.py Modules/_ctypes/libffi/generate-ios-source-and-headers.py Modules/_ctypes/libffi/generate-osx-source-and-headers.py Modules/_decimal/tests/bench.py Modules/_decimal/tests/deccheck.py Modules/_decimal/tests/randdec.py Objects/typeslots.py Tools/clinic/clinic_test.py Tools/gdb/libpython.py Tools/i18n/makelocalealias.py Tools/pybench/Setup.py Tools/pybench/clockres.py Tools/pybench/systimes.py Tools/scripts/checkpip.py Tools/ssl/make_ssl_data.py Tools/test2to3/maintest.py Tools/unicode/comparecodecs.py Tools/unittestgui/unittestgui.py I think most of them should got executable bit. Exceptions are: Doc/includes/*.py -- they are just examples, it can be dangerous set executable bit on files which can be exposed via http server. Lib/test/test_*.py -- they don't purposed to ran with with default system Python. Shebangs should be removed. Lib/test/_test_multiprocessing.py, Lib/test/multibytecodec_support.py -- they are just auxiliary modules for other tests. Shebangs should be removed. Lib/http/cookies.py, Lib/mailbox.py, Lib/operator.py, Modules/_decimal/tests/randdec.py -- they don't do anything. Shebangs should be removed. Tools/test2to3/maintest.py -- this is Python2 script with Python3 shebang. Lib/difflib.py -- this just runs doctests. Shebang should be removed. Following files have shebang but have no executable permission bit. Both should be removed. Lib/test/test_array.py Lib/test/test_binhex.py Lib/test/test_errno.py Lib/test/test_urlparse.py Lib/test/test_userstring.py In Tools/unittestgui/unittestgui.py python should be changed to python3 in the shebang. Any thoughts? -- assignee: serhiy.storchaka components: Demos and Tools, Library (Lib) files: executable_scripts.patch keywords: patch messages: 205677 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Executable permissions of Python source files type: behavior versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file33056/executable_scripts.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19936 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com