1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-07-29 16:48:30 +00:00

Raise minimum recommended Python version to 3.10 (#13859)

Ref: https://github.com/yt-dlp/yt-dlp/issues/13858

Authored by: bashonly
This commit is contained in:
bashonly 2025-07-26 17:59:02 -05:00 committed by GitHub
parent cc5a5caac5
commit 23c658b9cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -139,7 +139,7 @@ def _get_binary_name():
def _get_system_deprecation(): def _get_system_deprecation():
MIN_SUPPORTED, MIN_RECOMMENDED = (3, 9), (3, 9) MIN_SUPPORTED, MIN_RECOMMENDED = (3, 9), (3, 10)
EXE_MSG_TMPL = ('Support for {} has been deprecated. ' EXE_MSG_TMPL = ('Support for {} has been deprecated. '
'See https://github.com/yt-dlp/yt-dlp/{} for details.\n{}') 'See https://github.com/yt-dlp/yt-dlp/{} for details.\n{}')
@ -161,6 +161,13 @@ def _get_system_deprecation():
if sys.version_info < MIN_SUPPORTED: if sys.version_info < MIN_SUPPORTED:
return f'Python version {major}.{minor} is no longer supported! {PYTHON_MSG}' return f'Python version {major}.{minor} is no longer supported! {PYTHON_MSG}'
# Temporary until aarch64/armv7l build flow is bumped to Ubuntu 22.04 and Python 3.10
if variant in ('linux_aarch64_exe', 'linux_armv7l_exe'):
libc_ver = version_tuple(os.confstr('CS_GNU_LIBC_VERSION').partition(' ')[2])
if libc_ver < (2, 35):
return EXE_MSG_TMPL.format('system glibc version < 2.35', 'issues/13858', STOP_MSG)
return None
return f'Support for Python version {major}.{minor} has been deprecated. {PYTHON_MSG}' return f'Support for Python version {major}.{minor} has been deprecated. {PYTHON_MSG}'