From ed3bb2b0a12c44334e0d09481752dabf2ca1dc13 Mon Sep 17 00:00:00 2001 From: pukkandan Date: Sun, 10 Mar 2024 22:28:37 +0530 Subject: [PATCH] [cleanup] Remove unused code (#8968) Authored by: pukkandan, seproDev --- README.md | 2 +- devscripts/SizeOfImage.patch | Bin 147 -> 0 bytes devscripts/SizeOfImage_w.patch | Bin 148 -> 0 bytes yt_dlp/casefold.py | 5 ----- yt_dlp/dependencies/__init__.py | 4 +--- 5 files changed, 2 insertions(+), 9 deletions(-) delete mode 100644 devscripts/SizeOfImage.patch delete mode 100644 devscripts/SizeOfImage_w.patch delete mode 100644 yt_dlp/casefold.py diff --git a/README.md b/README.md index 7b72dcabc..1e108a29c 100644 --- a/README.md +++ b/README.md @@ -2175,7 +2175,7 @@ Some of yt-dlp's default options are different from that of youtube-dl and youtu * yt-dlp versions between 2021.09.01 and 2023.01.02 applies `--match-filter` to nested playlists. This was an unintentional side-effect of [8f18ac](https://github.com/yt-dlp/yt-dlp/commit/8f18aca8717bb0dd49054555af8d386e5eda3a88) and is fixed in [d7b460](https://github.com/yt-dlp/yt-dlp/commit/d7b460d0e5fc710950582baed2e3fc616ed98a80). Use `--compat-options playlist-match-filter` to revert this * yt-dlp versions between 2021.11.10 and 2023.06.21 estimated `filesize_approx` values for fragmented/manifest formats. This was added for convenience in [f2fe69](https://github.com/yt-dlp/yt-dlp/commit/f2fe69c7b0d208bdb1f6292b4ae92bc1e1a7444a), but was reverted in [0dff8e](https://github.com/yt-dlp/yt-dlp/commit/0dff8e4d1e6e9fb938f4256ea9af7d81f42fd54f) due to the potentially extreme inaccuracy of the estimated values. Use `--compat-options manifest-filesize-approx` to keep extracting the estimated values * yt-dlp uses modern http client backends such as `requests`. Use `--compat-options prefer-legacy-http-handler` to prefer the legacy http handler (`urllib`) to be used for standard http requests. -* The sub-modules `swfinterp` is removed. +* The sub-modules `swfinterp`, `casefold` are removed. For ease of use, a few more compat options are available: diff --git a/devscripts/SizeOfImage.patch b/devscripts/SizeOfImage.patch deleted file mode 100644 index d5845af4641a3a4028d70fe47ece829bcbdad4e2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 147 zcmZa{;KY> VM{?ptt`-3kK&n7`AUp;j008^TDJB2_ diff --git a/yt_dlp/casefold.py b/yt_dlp/casefold.py deleted file mode 100644 index 41a53e5b6..000000000 --- a/yt_dlp/casefold.py +++ /dev/null @@ -1,5 +0,0 @@ -import warnings - -warnings.warn(DeprecationWarning(f'{__name__} is deprecated')) - -casefold = str.casefold diff --git a/yt_dlp/dependencies/__init__.py b/yt_dlp/dependencies/__init__.py index 3ef01fa02..9e3f90724 100644 --- a/yt_dlp/dependencies/__init__.py +++ b/yt_dlp/dependencies/__init__.py @@ -53,9 +53,7 @@ except ImportError: try: import websockets -except (ImportError, SyntaxError): - # websockets 3.10 on Python 3.6 causes SyntaxError - # See https://github.com/yt-dlp/yt-dlp/issues/2633 +except ImportError: websockets = None try: