]> jfr.im git - yt-dlp.git/commitdiff
[dependencies] Handle deprecation of `sqlite3.version` (#8167)
authorbashonly <redacted>
Thu, 21 Sep 2023 15:58:53 +0000 (10:58 -0500)
committerGitHub <redacted>
Thu, 21 Sep 2023 15:58:53 +0000 (15:58 +0000)
Closes #8152
Authored by: bashonly

yt_dlp/compat/compat_utils.py
yt_dlp/dependencies/__init__.py

index 3ca46d270c9cca6d4f83eac176b0edfe9ceed1b7..d62b7d0488dc9510cd9c5ffb1a5d3f8d2f834c72 100644 (file)
@@ -15,7 +15,7 @@ def get_package_info(module):
         name=getattr(module, '_yt_dlp__identifier', module.__name__),
         version=str(next(filter(None, (
             getattr(module, attr, None)
-            for attr in ('__version__', 'version_string', 'version')
+            for attr in ('_yt_dlp__version', '__version__', 'version_string', 'version')
         )), None)))
 
 
index 6e7d29c5cac19e20728598a245aaa595e182c764..b56e4f5cc6a6f4aa87f0b95ef7fcd331432a2c53 100644 (file)
@@ -43,6 +43,8 @@
 
 try:
     import sqlite3
+    # We need to get the underlying `sqlite` version, see https://github.com/yt-dlp/yt-dlp/issues/8152
+    sqlite3._yt_dlp__version = sqlite3.sqlite_version
 except ImportError:
     # although sqlite3 is part of the standard library, it is possible to compile python without
     # sqlite support. See: https://github.com/yt-dlp/yt-dlp/issues/544