diff --git a/yt_dlp/update.py b/yt_dlp/update.py index c22843d891..ad0862ab3e 100644 --- a/yt_dlp/update.py +++ b/yt_dlp/update.py @@ -165,7 +165,7 @@ def _get_binary_name(): def _get_system_deprecation(): - MIN_SUPPORTED, MIN_RECOMMENDED = (3, 10), (3, 10) + MIN_SUPPORTED, MIN_RECOMMENDED = (3, 10), (3, 11) if sys.version_info > MIN_RECOMMENDED: return None @@ -176,6 +176,19 @@ def _get_system_deprecation(): if sys.version_info < MIN_SUPPORTED: return f'Python version {major}.{minor} is no longer supported! {PYTHON_MSG}' + # Temporary until Windows builds use 3.14, which will drop support for Win8.x and 2012Server + if detect_variant() in ('win_exe', 'win_x86_exe'): + # Do not inappropriately warn for unofficial/third-party binaries + if not ORIGIN.startswith('yt-dlp/'): + return None + platform_name = platform.platform() + if any(platform_name.startswith(f'Windows-{name}') for name in ('8', '2012Server')): + return ( + 'Support for Windows 8.x and Windows Server 2012 has been deprecated. ' + 'See https://github.com/yt-dlp/yt-dlp/issues/16917 for details.\n' + 'You may stop receiving updates on this version at any time!') + return None + return f'Support for Python version {major}.{minor} has been deprecated. {PYTHON_MSG}'