Skip to content

Commit

Permalink
[networking] Pin curl-cffi version to < 0.7.2 (#11092)
Browse files Browse the repository at this point in the history
Ref: lexiforest/curl_cffi#394

Authored by: bashonly
  • Loading branch information
bashonly authored Sep 25, 2024
1 parent fa2be9a commit 5bb1aa0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ dependencies = [
default = []
curl-cffi = [
"curl-cffi==0.5.10; os_name=='nt' and implementation_name=='cpython'",
"curl-cffi>=0.5.10,!=0.6.*,<0.8; os_name!='nt' and implementation_name=='cpython'",
"curl-cffi>=0.5.10,!=0.6.*,<0.7.2; os_name!='nt' and implementation_name=='cpython'",
]
secretstorage = [
"cffi",
Expand Down
4 changes: 2 additions & 2 deletions yt_dlp/networking/_curlcffi.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@

curl_cffi_version = tuple(map(int, re.split(r'[^\d]+', curl_cffi.__version__)[:3]))

if curl_cffi_version != (0, 5, 10) and not ((0, 7, 0) <= curl_cffi_version < (0, 8, 0)):
if curl_cffi_version != (0, 5, 10) and not ((0, 7, 0) <= curl_cffi_version < (0, 7, 2)):
curl_cffi._yt_dlp__version = f'{curl_cffi.__version__} (unsupported)'
raise ImportError('Only curl_cffi versions 0.5.10, 0.7.X are supported')
raise ImportError('Only curl_cffi versions 0.5.10, 0.7.0 and 0.7.1 are supported')

import curl_cffi.requests
from curl_cffi.const import CurlECode, CurlOpt
Expand Down

0 comments on commit 5bb1aa0

Please sign in to comment.