aboutsummaryrefslogtreecommitdiff
path: root/yt_dlp/__init__.py
diff options
context:
space:
mode:
authorbashonly <88596187+bashonly@users.noreply.github.com>2023-11-16 12:39:00 -0600
committerGitHub <noreply@github.com>2023-11-16 18:39:00 +0000
commitf4b95acafcd69a50040730dfdf732e797278fdcc (patch)
treea0fd57492a2e4b4055b776e76d14556ce1a30852 /yt_dlp/__init__.py
parentfe6c82ccff6338d97711204162731a8a6741c9b4 (diff)
Remove Python 3.7 support (#8361)
Closes #7803 Authored by: bashonly
Diffstat (limited to 'yt_dlp/__init__.py')
-rw-r--r--yt_dlp/__init__.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/yt_dlp/__init__.py b/yt_dlp/__init__.py
index 991dbcda7..446f0c47b 100644
--- a/yt_dlp/__init__.py
+++ b/yt_dlp/__init__.py
@@ -1,8 +1,8 @@
-try:
- import contextvars # noqa: F401
-except Exception:
- raise Exception(
- f'You are using an unsupported version of Python. Only Python versions 3.7 and above are supported by yt-dlp') # noqa: F541
+import sys
+
+if sys.version_info < (3, 8):
+ raise ImportError(
+ f'You are using an unsupported version of Python. Only Python versions 3.8 and above are supported by yt-dlp') # noqa: F541
__license__ = 'Public Domain'
@@ -12,7 +12,6 @@ import itertools
import optparse
import os
import re
-import sys
import traceback
from .compat import compat_shlex_quote