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 a41aa4c62..46b4b2ff5 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 5e0072468..50f6bebc6 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 e5740f40e..53b3e0f48 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 5313c4a01..fb45e0280 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 f9bb2ad3b..0979eee5b 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 61487f925..e122d0283 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 c4e5fc1f4..d06655d10 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 b0cacbc4b..c7f3eef76 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 13f337c82..902059231 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 cc1cf0bd4..f13262f76 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 9cbf5b749..3f56af744 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 12655bf89..17a34843f 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 4578a33ce..485b39e9f 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 e76f1e4c8..4855aa7c8 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 c6e7b5309..2d1673d0e 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 68d40014b..780df0de6 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 b0b68e6c3..8f24fdaf6 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 22547fc5f..8f74c06c1 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 c4b7f689e..9b6672a1d 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 1696ccd30..2b3ed8f7b 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 0fadf812b..c514413a4 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 efbdd2e1a..4fd87ce22 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 2eccd4718..af89f29ff 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 5f3c77d8e..68c1c68d3 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 d6de22194..8c4f85387 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 d903a5bfe..c9bc4d7fb 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 ed6f73c0c..23d733f44 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 2ef96b922..03ae8c62a 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 8a0d65bfb..cf6b6b913 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 c9e7ee225..40df167e0 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 b39bf4270..e6ed9d628 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 def823884..8b2b60403 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 41b4e6dea..20dfcb70a 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 51031871c..3f9a61c1e 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 868bb25f9..1f8f375cc 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 8b4286982..76aabb27f 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 61547cdb1..f7f356832 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 29a390e42..5d5b21e6d 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 617aee2f8..1e8edf0f6 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 cf541de4a..04d355b4f 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 9b1ccde88..86b039a4a 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 3a0122374..fa31be0cc 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 b38a47fc5..528b75334 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 d9bb10d26..402681cad 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 80cb4b93a..1a5063bab 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 b67da9f08..a09c05b41 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 108a44d47..45a29d3c7 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 f7329d67e..c9f41473d 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 ee4343515..dea7d85cd 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