1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2026-01-20 22:01:21 +00:00

[rh:curl_cffi] Support curl_cffi 0.14.x (#15613)

Closes #11860
Authored by: bashonly
This commit is contained in:
bashonly
2026-01-18 17:40:37 -06:00
committed by GitHub
parent dde5eab3b3
commit 9ab4777b97
4 changed files with 10 additions and 6 deletions

View File

@@ -335,7 +335,7 @@ jobs:
# We need to fuse our own universal2 wheels for curl_cffi
python3 -m pip install -U 'delocate==0.11.0'
mkdir curl_cffi_whls curl_cffi_universal2
python3 devscripts/install_deps.py --print --omit-default --include-extra curl-cffi > requirements.txt
python3 devscripts/install_deps.py --print --omit-default --include-extra build-curl-cffi > requirements.txt
for platform in "macosx_11_0_arm64" "macosx_11_0_x86_64"; do
python3 -m pip download \
--only-binary=:all: \
@@ -464,7 +464,7 @@ jobs:
if ("${Env:ARCH}" -eq "x86") {
python devscripts/install_deps.py
} else {
python devscripts/install_deps.py --include-extra curl-cffi
python devscripts/install_deps.py --include-extra build-curl-cffi
}
- name: Prepare

View File

@@ -20,7 +20,7 @@ INCLUDES=(
)
if [[ -z "${EXCLUDE_CURL_CFFI:-}" ]]; then
INCLUDES+=(--include-extra curl-cffi)
INCLUDES+=(--include-extra build-curl-cffi)
fi
runpy -m venv /yt-dlp-build-venv

View File

@@ -59,7 +59,11 @@ default = [
"yt-dlp-ejs==0.3.2",
]
curl-cffi = [
"curl-cffi>=0.5.10,!=0.6.*,!=0.7.*,!=0.8.*,!=0.9.*,<0.14; implementation_name=='cpython'",
"curl-cffi>=0.5.10,!=0.6.*,!=0.7.*,!=0.8.*,!=0.9.*,<0.15; implementation_name=='cpython'",
]
build-curl-cffi = [
"curl-cffi==0.13.0; sys_platform=='darwin' or (sys_platform=='linux' and platform_machine!='armv7l')",
"curl-cffi==0.14.0; sys_platform=='win32' or (sys_platform=='linux' and platform_machine=='armv7l')",
]
secretstorage = [
"cffi",

View File

@@ -33,9 +33,9 @@ if curl_cffi is None:
curl_cffi_version = tuple(map(int, re.split(r'[^\d]+', curl_cffi.__version__)[:3]))
if curl_cffi_version != (0, 5, 10) and not (0, 10) <= curl_cffi_version < (0, 14):
if curl_cffi_version != (0, 5, 10) and not (0, 10) <= curl_cffi_version < (0, 15):
curl_cffi._yt_dlp__version = f'{curl_cffi.__version__} (unsupported)'
raise ImportError('Only curl_cffi versions 0.5.10, 0.10.x, 0.11.x, 0.12.x, 0.13.x are supported')
raise ImportError('Only curl_cffi versions 0.5.10 and 0.10.x through 0.14.x are supported')
import curl_cffi.requests
from curl_cffi.const import CurlECode, CurlOpt