aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/common.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2022-08-30 20:58:28 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2022-08-30 21:03:07 +0530
commitda4db748fa813a8de684d5ab699b8f561b982e35 (patch)
treeb3a393bb7d9ed79c698783f3ce21fc08ac642455 /yt_dlp/extractor/common.py
parente1eabd7beb4cc83338a7422546ae1c9ae8b2097f (diff)
downloadhypervideo-pre-da4db748fa813a8de684d5ab699b8f561b982e35.tar.lz
hypervideo-pre-da4db748fa813a8de684d5ab699b8f561b982e35.tar.xz
hypervideo-pre-da4db748fa813a8de684d5ab699b8f561b982e35.zip
[utils] Add `deprecation_warning`
See https://github.com/yt-dlp/yt-dlp/pull/2173#issuecomment-1097021515
Diffstat (limited to 'yt_dlp/extractor/common.py')
-rw-r--r--yt_dlp/extractor/common.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py
index 6337a13a4..f950d28ed 100644
--- a/yt_dlp/extractor/common.py
+++ b/yt_dlp/extractor/common.py
@@ -1766,9 +1766,8 @@ class InfoExtractor:
if field not in self.settings:
if key in ('forced', 'priority'):
return False
- self.ydl.deprecation_warning(
- f'Using arbitrary fields ({field}) for format sorting is deprecated '
- 'and may be removed in a future version')
+ self.ydl.deprecated_feature(f'Using arbitrary fields ({field}) for format sorting is '
+ 'deprecated and may be removed in a future version')
self.settings[field] = {}
propObj = self.settings[field]
if key not in propObj:
@@ -1853,9 +1852,8 @@ class InfoExtractor:
if self._get_field_setting(field, 'type') == 'alias':
alias, field = field, self._get_field_setting(field, 'field')
if self._get_field_setting(alias, 'deprecated'):
- self.ydl.deprecation_warning(
- f'Format sorting alias {alias} is deprecated '
- f'and may be removed in a future version. Please use {field} instead')
+ self.ydl.deprecated_feature(f'Format sorting alias {alias} is deprecated and may '
+ 'be removed in a future version. Please use {field} instead')
reverse = match.group('reverse') is not None
closest = match.group('separator') == '~'
limit_text = match.group('limit')