From cc52de43568d8cd58c7e2ef4e5cecf609da28a9c Mon Sep 17 00:00:00 2001 From: felix Date: Thu, 3 Jun 2021 11:43:42 +0200 Subject: [PATCH] [cleanup] Point all shebang to `python3` (#372) Authored by: fstirlitz --- devscripts/bash-completion.py | 2 +- devscripts/check-porn.py | 2 +- devscripts/create-github-release.py | 2 +- devscripts/fish-completion.py | 2 +- devscripts/generate_aes_testdata.py | 1 + devscripts/gh-pages/update-copyright.py | 2 +- devscripts/lazy_load_template.py | 1 + devscripts/make_contributing.py | 2 +- devscripts/make_issue_template.py | 2 +- devscripts/make_lazy_extractors.py | 1 + devscripts/make_readme.py | 5 +++++ devscripts/make_supportedsites.py | 2 +- devscripts/prepare_manpage.py | 1 + devscripts/show-downloads-statistics.py | 2 +- devscripts/update-version.py | 2 ++ devscripts/zsh-completion.py | 2 +- pyinst.py | 2 +- setup.py | 2 +- test/test_InfoExtractor.py | 2 +- test/test_YoutubeDL.py | 2 +- test/test_YoutubeDLCookieJar.py | 2 +- test/test_aes.py | 2 +- test/test_age_restriction.py | 2 +- test/test_all_urls.py | 2 +- test/test_cache.py | 2 +- test/test_compat.py | 2 +- test/test_download.py | 2 +- test/test_downloader_http.py | 2 +- test/test_execution.py | 2 +- test/test_http.py | 2 +- test/test_iqiyi_sdk_interpreter.py | 2 +- test/test_jsinterp.py | 2 +- test/test_overwrites.py | 2 +- test/test_post_hooks.py | 2 +- test/test_postprocessors.py | 2 +- test/test_socks.py | 2 +- test/test_subtitles.py | 2 +- test/test_swfinterp.py | 2 +- test/test_update.py.disabled | 2 +- test/test_utils.py | 2 +- test/test_verbose_output.py | 2 +- test/test_write_annotations.py | 2 +- test/test_youtube_lists.py | 2 +- test/test_youtube_misc.py | 2 +- test/test_youtube_signature.py | 2 +- yt_dlp/YoutubeDL.py | 2 +- yt_dlp/__init__.py | 2 +- yt_dlp/__main__.py | 2 +- yt_dlp/utils.py | 2 +- 49 files changed, 54 insertions(+), 43 deletions(-) diff --git a/devscripts/bash-completion.py b/devscripts/bash-completion.py index a41aa4c620d4..46b4b2ff5549 100755 --- a/devscripts/bash-completion.py +++ b/devscripts/bash-completion.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import unicode_literals import os diff --git a/devscripts/check-porn.py b/devscripts/check-porn.py index 5e00724683fc..50f6bebc643f 100644 --- a/devscripts/check-porn.py +++ b/devscripts/check-porn.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import unicode_literals """ diff --git a/devscripts/create-github-release.py b/devscripts/create-github-release.py index e5740f40e890..53b3e0f48559 100644 --- a/devscripts/create-github-release.py +++ b/devscripts/create-github-release.py @@ -1,6 +1,6 @@ # Unused -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import unicode_literals import io diff --git a/devscripts/fish-completion.py b/devscripts/fish-completion.py index 5313c4a0164e..fb45e028057b 100755 --- a/devscripts/fish-completion.py +++ b/devscripts/fish-completion.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import unicode_literals import optparse diff --git a/devscripts/generate_aes_testdata.py b/devscripts/generate_aes_testdata.py index f9bb2ad3b0f0..0979eee5b90f 100644 --- a/devscripts/generate_aes_testdata.py +++ b/devscripts/generate_aes_testdata.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 from __future__ import unicode_literals import codecs diff --git a/devscripts/gh-pages/update-copyright.py b/devscripts/gh-pages/update-copyright.py index 61487f925886..e122d0283f24 100755 --- a/devscripts/gh-pages/update-copyright.py +++ b/devscripts/gh-pages/update-copyright.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # coding: utf-8 from __future__ import with_statement, unicode_literals diff --git a/devscripts/lazy_load_template.py b/devscripts/lazy_load_template.py index c4e5fc1f40e7..d06655d10651 100644 --- a/devscripts/lazy_load_template.py +++ b/devscripts/lazy_load_template.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # coding: utf-8 from __future__ import unicode_literals diff --git a/devscripts/make_contributing.py b/devscripts/make_contributing.py index b0cacbc4bfc6..c7f3eef761a3 100755 --- a/devscripts/make_contributing.py +++ b/devscripts/make_contributing.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import unicode_literals # import io diff --git a/devscripts/make_issue_template.py b/devscripts/make_issue_template.py index 13f337c8225a..9020592317de 100644 --- a/devscripts/make_issue_template.py +++ b/devscripts/make_issue_template.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import unicode_literals import io diff --git a/devscripts/make_lazy_extractors.py b/devscripts/make_lazy_extractors.py index cc1cf0bd4a5b..f13262f76f2e 100644 --- a/devscripts/make_lazy_extractors.py +++ b/devscripts/make_lazy_extractors.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 from __future__ import unicode_literals, print_function from inspect import getsource diff --git a/devscripts/make_readme.py b/devscripts/make_readme.py index 9cbf5b749806..3f56af74470b 100755 --- a/devscripts/make_readme.py +++ b/devscripts/make_readme.py @@ -1,3 +1,8 @@ +#!/usr/bin/env python3 + +# yt-dlp --help | make_readme.py +# This must be run in a console of correct width + from __future__ import unicode_literals import io diff --git a/devscripts/make_supportedsites.py b/devscripts/make_supportedsites.py index 12655bf89b2f..17a34843fda4 100644 --- a/devscripts/make_supportedsites.py +++ b/devscripts/make_supportedsites.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import unicode_literals import io diff --git a/devscripts/prepare_manpage.py b/devscripts/prepare_manpage.py index 4578a33ceb32..485b39e9f308 100644 --- a/devscripts/prepare_manpage.py +++ b/devscripts/prepare_manpage.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 from __future__ import unicode_literals import io diff --git a/devscripts/show-downloads-statistics.py b/devscripts/show-downloads-statistics.py index e76f1e4c8a86..4855aa7c8524 100644 --- a/devscripts/show-downloads-statistics.py +++ b/devscripts/show-downloads-statistics.py @@ -1,6 +1,6 @@ # Unused -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import unicode_literals import itertools diff --git a/devscripts/update-version.py b/devscripts/update-version.py index c6e7b53098c7..2d1673d0e2b1 100644 --- a/devscripts/update-version.py +++ b/devscripts/update-version.py @@ -1,4 +1,6 @@ +#!/usr/bin/env python3 from __future__ import unicode_literals + from datetime import datetime # import urllib.request diff --git a/devscripts/zsh-completion.py b/devscripts/zsh-completion.py index 68d40014bafd..780df0de6cbb 100755 --- a/devscripts/zsh-completion.py +++ b/devscripts/zsh-completion.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import unicode_literals import os diff --git a/pyinst.py b/pyinst.py index b0b68e6c3d06..8f24fdaf675b 100644 --- a/pyinst.py +++ b/pyinst.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # coding: utf-8 from __future__ import unicode_literals diff --git a/setup.py b/setup.py index 22547fc5f390..8f74c06c1abe 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # coding: utf-8 from setuptools import setup, Command, find_packages diff --git a/test/test_InfoExtractor.py b/test/test_InfoExtractor.py index c4b7f689e321..9b6672a1db15 100644 --- a/test/test_InfoExtractor.py +++ b/test/test_InfoExtractor.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import unicode_literals diff --git a/test/test_YoutubeDL.py b/test/test_YoutubeDL.py index 1696ccd3068c..2b3ed8f7b5e0 100644 --- a/test/test_YoutubeDL.py +++ b/test/test_YoutubeDL.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # coding: utf-8 from __future__ import unicode_literals diff --git a/test/test_YoutubeDLCookieJar.py b/test/test_YoutubeDLCookieJar.py index 0fadf812b0f1..c514413a4564 100644 --- a/test/test_YoutubeDLCookieJar.py +++ b/test/test_YoutubeDLCookieJar.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # coding: utf-8 from __future__ import unicode_literals diff --git a/test/test_aes.py b/test/test_aes.py index efbdd2e1a996..4fd87ce22925 100644 --- a/test/test_aes.py +++ b/test/test_aes.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import unicode_literals diff --git a/test/test_age_restriction.py b/test/test_age_restriction.py index 2eccd4718713..af89f29ff725 100644 --- a/test/test_age_restriction.py +++ b/test/test_age_restriction.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import unicode_literals # Allow direct execution diff --git a/test/test_all_urls.py b/test/test_all_urls.py index 5f3c77d8e05b..68c1c68d3f2d 100644 --- a/test/test_all_urls.py +++ b/test/test_all_urls.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import unicode_literals diff --git a/test/test_cache.py b/test/test_cache.py index d6de221946f7..8c4f853872b0 100644 --- a/test/test_cache.py +++ b/test/test_cache.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # coding: utf-8 from __future__ import unicode_literals diff --git a/test/test_compat.py b/test/test_compat.py index d903a5bfeabb..c9bc4d7fb5c6 100644 --- a/test/test_compat.py +++ b/test/test_compat.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # coding: utf-8 from __future__ import unicode_literals diff --git a/test/test_download.py b/test/test_download.py index ed6f73c0c992..23d733f446ec 100644 --- a/test/test_download.py +++ b/test/test_download.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import unicode_literals diff --git a/test/test_downloader_http.py b/test/test_downloader_http.py index 2ef96b922c2d..03ae8c62a4cc 100644 --- a/test/test_downloader_http.py +++ b/test/test_downloader_http.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # coding: utf-8 from __future__ import unicode_literals diff --git a/test/test_execution.py b/test/test_execution.py index 8a0d65bfb1c8..cf6b6b91350d 100644 --- a/test/test_execution.py +++ b/test/test_execution.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # coding: utf-8 from __future__ import unicode_literals diff --git a/test/test_http.py b/test/test_http.py index c9e7ee225cd0..40df167e0796 100644 --- a/test/test_http.py +++ b/test/test_http.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # coding: utf-8 from __future__ import unicode_literals diff --git a/test/test_iqiyi_sdk_interpreter.py b/test/test_iqiyi_sdk_interpreter.py index b39bf42701d3..e6ed9d628c9a 100644 --- a/test/test_iqiyi_sdk_interpreter.py +++ b/test/test_iqiyi_sdk_interpreter.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import unicode_literals diff --git a/test/test_jsinterp.py b/test/test_jsinterp.py index def823884dde..8b2b60403ce7 100644 --- a/test/test_jsinterp.py +++ b/test/test_jsinterp.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import unicode_literals diff --git a/test/test_overwrites.py b/test/test_overwrites.py index 41b4e6deadcf..20dfcb70a185 100644 --- a/test/test_overwrites.py +++ b/test/test_overwrites.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import unicode_literals import os diff --git a/test/test_post_hooks.py b/test/test_post_hooks.py index 51031871c676..3f9a61c1ec03 100644 --- a/test/test_post_hooks.py +++ b/test/test_post_hooks.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import unicode_literals diff --git a/test/test_postprocessors.py b/test/test_postprocessors.py index 868bb25f9bf7..1f8f375cc3fc 100644 --- a/test/test_postprocessors.py +++ b/test/test_postprocessors.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import unicode_literals diff --git a/test/test_socks.py b/test/test_socks.py index 8b42869821c9..76aabb27f0bd 100644 --- a/test/test_socks.py +++ b/test/test_socks.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # coding: utf-8 from __future__ import unicode_literals diff --git a/test/test_subtitles.py b/test/test_subtitles.py index 61547cdb1040..f7f356832ed1 100644 --- a/test/test_subtitles.py +++ b/test/test_subtitles.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import unicode_literals # Allow direct execution diff --git a/test/test_swfinterp.py b/test/test_swfinterp.py index 29a390e425d7..5d5b21e6d218 100644 --- a/test/test_swfinterp.py +++ b/test/test_swfinterp.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import unicode_literals # Allow direct execution diff --git a/test/test_update.py.disabled b/test/test_update.py.disabled index 617aee2f8bc9..1e8edf0f6b88 100644 --- a/test/test_update.py.disabled +++ b/test/test_update.py.disabled @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import unicode_literals diff --git a/test/test_utils.py b/test/test_utils.py index cf541de4ad8b..04d355b4fb93 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # coding: utf-8 from __future__ import unicode_literals diff --git a/test/test_verbose_output.py b/test/test_verbose_output.py index 9b1ccde880c1..86b039a4aa18 100644 --- a/test/test_verbose_output.py +++ b/test/test_verbose_output.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # coding: utf-8 from __future__ import unicode_literals diff --git a/test/test_write_annotations.py b/test/test_write_annotations.py index 3a012237482f..fa31be0cc666 100644 --- a/test/test_write_annotations.py +++ b/test/test_write_annotations.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # coding: utf-8 from __future__ import unicode_literals diff --git a/test/test_youtube_lists.py b/test/test_youtube_lists.py index b38a47fc519a..528b7533455a 100644 --- a/test/test_youtube_lists.py +++ b/test/test_youtube_lists.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import unicode_literals # Allow direct execution diff --git a/test/test_youtube_misc.py b/test/test_youtube_misc.py index d9bb10d26559..402681cad8f9 100644 --- a/test/test_youtube_misc.py +++ b/test/test_youtube_misc.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import unicode_literals # Allow direct execution diff --git a/test/test_youtube_signature.py b/test/test_youtube_signature.py index 80cb4b93aa98..1a5063bab8a9 100644 --- a/test/test_youtube_signature.py +++ b/test/test_youtube_signature.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import unicode_literals diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index b67da9f08d4e..a09c05b414c3 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # coding: utf-8 from __future__ import absolute_import, unicode_literals diff --git a/yt_dlp/__init__.py b/yt_dlp/__init__.py index 108a44d473e4..45a29d3c766f 100644 --- a/yt_dlp/__init__.py +++ b/yt_dlp/__init__.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # coding: utf-8 from __future__ import unicode_literals diff --git a/yt_dlp/__main__.py b/yt_dlp/__main__.py index f7329d67eaf9..c9f41473db70 100644 --- a/yt_dlp/__main__.py +++ b/yt_dlp/__main__.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import unicode_literals # Execute with diff --git a/yt_dlp/utils.py b/yt_dlp/utils.py index ee434351568c..dea7d85cd4e6 100644 --- a/yt_dlp/utils.py +++ b/yt_dlp/utils.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # coding: utf-8 from __future__ import unicode_literals