Skip to content

Commit 2c90262

Browse files
Merge branch 'master' into patch-2
2 parents 5ac4c3b + 5f37f67 commit 2c90262

File tree

122 files changed

+6315
-2149
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+6315
-2149
lines changed

.github/actionlint.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
self-hosted-runner:
2-
labels:
3-
# Workaround for the outdated runner list in actionlint v1.7.7
4-
# Ref: https://github.com/rhysd/actionlint/issues/533
5-
- windows-11-arm
6-
71
config-variables:
82
- KEEP_CACHE_WARM
93
- PUSH_VERSION_COMMIT

.github/workflows/build.yml

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,12 @@ jobs:
153153
'os': 'musllinux',
154154
'arch': 'x86_64',
155155
'runner': 'ubuntu-24.04',
156+
'python_version': '3.14',
156157
}, {
157158
'os': 'musllinux',
158159
'arch': 'aarch64',
159160
'runner': 'ubuntu-24.04-arm',
161+
'python_version': '3.14',
160162
}],
161163
}
162164
INPUTS = json.loads(os.environ['INPUTS'])
@@ -194,7 +196,7 @@ jobs:
194196
UPDATE_TO: yt-dlp/yt-dlp@2025.09.05
195197

196198
steps:
197-
- uses: actions/checkout@v5
199+
- uses: actions/checkout@v6
198200
with:
199201
fetch-depth: 0 # Needed for changelog
200202

@@ -214,7 +216,7 @@ jobs:
214216
215217
- name: Build Unix platform-independent binary
216218
run: |
217-
make all tar
219+
make all-extra tar
218220
219221
- name: Verify --update-to
220222
if: vars.UPDATE_TO_VERIFICATION
@@ -255,7 +257,7 @@ jobs:
255257
SKIP_ONEFILE_BUILD: ${{ (!matrix.onefile && '1') || '' }}
256258

257259
steps:
258-
- uses: actions/checkout@v5
260+
- uses: actions/checkout@v6
259261

260262
- name: Cache requirements
261263
if: matrix.cache_requirements
@@ -318,7 +320,7 @@ jobs:
318320
UPDATE_TO: yt-dlp/yt-dlp@2025.09.05
319321

320322
steps:
321-
- uses: actions/checkout@v5
323+
- uses: actions/checkout@v6
322324
# NB: Building universal2 does not work with python from actions/setup-python
323325

324326
- name: Cache requirements
@@ -341,14 +343,14 @@ jobs:
341343
brew uninstall --ignore-dependencies python3
342344
python3 -m venv ~/yt-dlp-build-venv
343345
source ~/yt-dlp-build-venv/bin/activate
344-
python3 devscripts/install_deps.py -o --include build
345-
python3 devscripts/install_deps.py --print --include pyinstaller > requirements.txt
346+
python3 devscripts/install_deps.py --omit-default --include-extra build
347+
python3 devscripts/install_deps.py --print --include-extra pyinstaller > requirements.txt
346348
# We need to ignore wheels otherwise we break universal2 builds
347349
python3 -m pip install -U --no-binary :all: -r requirements.txt
348350
# We need to fuse our own universal2 wheels for curl_cffi
349351
python3 -m pip install -U 'delocate==0.11.0'
350352
mkdir curl_cffi_whls curl_cffi_universal2
351-
python3 devscripts/install_deps.py --print -o --include curl-cffi > requirements.txt
353+
python3 devscripts/install_deps.py --print --omit-default --include-extra curl-cffi > requirements.txt
352354
for platform in "macosx_11_0_arm64" "macosx_11_0_x86_64"; do
353355
python3 -m pip download \
354356
--only-binary=:all: \
@@ -420,23 +422,23 @@ jobs:
420422
runner: windows-2025
421423
python_version: '3.10'
422424
platform_tag: win_amd64
423-
pyi_version: '6.16.0'
424-
pyi_tag: '2025.09.13.221251'
425-
pyi_hash: b6496c7630c3afe66900cfa824e8234a8c2e2c81704bd7facd79586abc76c0e5
425+
pyi_version: '6.17.0'
426+
pyi_tag: '2025.11.29.054325'
427+
pyi_hash: e28cc13e4ad0cc74330d832202806d0c1976e9165da6047309348ca663c0ed3d
426428
- arch: 'x86'
427429
runner: windows-2025
428430
python_version: '3.10'
429431
platform_tag: win32
430-
pyi_version: '6.16.0'
431-
pyi_tag: '2025.09.13.221251'
432-
pyi_hash: 2d881843580efdc54f3523507fc6d9c5b6051ee49c743a6d9b7003ac5758c226
432+
pyi_version: '6.17.0'
433+
pyi_tag: '2025.11.29.054325'
434+
pyi_hash: c00f600c17de3bdd589f043f60ab64fc34fcba6dd902ad973af9c8afc74f80d1
433435
- arch: 'arm64'
434436
runner: windows-11-arm
435437
python_version: '3.13' # arm64 only has Python >= 3.11 available
436438
platform_tag: win_arm64
437-
pyi_version: '6.16.0'
438-
pyi_tag: '2025.09.13.221251'
439-
pyi_hash: 4250c9085e34a95c898f3ee2f764914fc36ec59f0d97c28e6a75fcf21f7b144f
439+
pyi_version: '6.17.0'
440+
pyi_tag: '2025.11.29.054325'
441+
pyi_hash: a2033b18b4f7bc6108b5fd76a92c6c1de0a12ec4fe98a23396a9f978cb4b7d7b
440442
env:
441443
CHANNEL: ${{ inputs.channel }}
442444
ORIGIN: ${{ needs.process.outputs.origin }}
@@ -448,7 +450,7 @@ jobs:
448450
PYI_WHEEL: pyinstaller-${{ matrix.pyi_version }}-py3-none-${{ matrix.platform_tag }}.whl
449451

450452
steps:
451-
- uses: actions/checkout@v5
453+
- uses: actions/checkout@v6
452454
- uses: actions/setup-python@v6
453455
with:
454456
python-version: ${{ matrix.python_version }}
@@ -482,11 +484,11 @@ jobs:
482484
mkdir /pyi-wheels
483485
python -m pip download -d /pyi-wheels --no-deps --require-hashes "pyinstaller@${Env:PYI_URL}#sha256=${Env:PYI_HASH}"
484486
python -m pip install --force-reinstall -U "/pyi-wheels/${Env:PYI_WHEEL}"
485-
python devscripts/install_deps.py -o --include build
487+
python devscripts/install_deps.py --omit-default --include-extra build
486488
if ("${Env:ARCH}" -eq "x86") {
487489
python devscripts/install_deps.py
488490
} else {
489-
python devscripts/install_deps.py --include curl-cffi
491+
python devscripts/install_deps.py --include-extra curl-cffi
490492
}
491493
492494
- name: Prepare
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Challenge Tests
2+
on:
3+
push:
4+
paths:
5+
- .github/workflows/challenge-tests.yml
6+
- test/test_jsc/*.py
7+
- yt_dlp/extractor/youtube/jsc/**.js
8+
- yt_dlp/extractor/youtube/jsc/**.py
9+
- yt_dlp/extractor/youtube/pot/**.py
10+
- yt_dlp/utils/_jsruntime.py
11+
pull_request:
12+
paths:
13+
- .github/workflows/challenge-tests.yml
14+
- test/test_jsc/*.py
15+
- yt_dlp/extractor/youtube/jsc/**.js
16+
- yt_dlp/extractor/youtube/jsc/**.py
17+
- yt_dlp/extractor/youtube/pot/**.py
18+
- yt_dlp/utils/_jsruntime.py
19+
permissions:
20+
contents: read
21+
22+
concurrency:
23+
group: challenge-tests-${{ github.event.pull_request.number || github.ref }}
24+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
25+
26+
jobs:
27+
tests:
28+
name: Challenge Tests
29+
runs-on: ${{ matrix.os }}
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
os: [ubuntu-latest, windows-latest]
34+
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14', pypy-3.11]
35+
env:
36+
QJS_VERSION: '2025-04-26' # Earliest version with rope strings
37+
steps:
38+
- uses: actions/checkout@v6
39+
- name: Set up Python ${{ matrix.python-version }}
40+
uses: actions/setup-python@v6
41+
with:
42+
python-version: ${{ matrix.python-version }}
43+
- name: Install Deno
44+
uses: denoland/setup-deno@v2
45+
with:
46+
deno-version: '2.0.0' # minimum supported version
47+
- name: Install Bun
48+
uses: oven-sh/setup-bun@v2
49+
with:
50+
# minimum supported version is 1.0.31 but earliest available Windows version is 1.1.0
51+
bun-version: ${{ (matrix.os == 'windows-latest' && '1.1.0') || '1.0.31' }}
52+
- name: Install Node
53+
uses: actions/setup-node@v6
54+
with:
55+
node-version: '20.0' # minimum supported version
56+
- name: Install QuickJS (Linux)
57+
if: matrix.os == 'ubuntu-latest'
58+
run: |
59+
wget "https://bellard.org/quickjs/binary_releases/quickjs-linux-x86_64-${QJS_VERSION}.zip" -O quickjs.zip
60+
unzip quickjs.zip qjs
61+
sudo install qjs /usr/local/bin/qjs
62+
- name: Install QuickJS (Windows)
63+
if: matrix.os == 'windows-latest'
64+
shell: pwsh
65+
run: |
66+
Invoke-WebRequest "https://bellard.org/quickjs/binary_releases/quickjs-win-x86_64-${Env:QJS_VERSION}.zip" -OutFile quickjs.zip
67+
unzip quickjs.zip
68+
- name: Install test requirements
69+
run: |
70+
python ./devscripts/install_deps.py --print --omit-default --include-extra test > requirements.txt
71+
python ./devscripts/install_deps.py --print -c certifi -c requests -c urllib3 -c yt-dlp-ejs >> requirements.txt
72+
python -m pip install -U -r requirements.txt
73+
- name: Run tests
74+
timeout-minutes: 15
75+
run: |
76+
python -m yt_dlp -v --js-runtimes node --js-runtimes bun --js-runtimes quickjs || true
77+
python ./devscripts/run_tests.py test/test_jsc -k download

.github/workflows/codeql.yml

Lines changed: 7 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: "CodeQL"
22

33
on:
44
push:
5-
branches: [ 'master', 'gh-pages', 'release' ]
5+
branches: [ 'master' ]
66
pull_request:
77
# The branches below must be a subset of the branches above
88
branches: [ 'master' ]
@@ -11,7 +11,7 @@ on:
1111

1212
jobs:
1313
analyze:
14-
name: Analyze
14+
name: Analyze (${{ matrix.language }})
1515
runs-on: ubuntu-latest
1616
permissions:
1717
actions: read
@@ -21,45 +21,19 @@ jobs:
2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
language: [ 'python' ]
25-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
26-
# Use only 'java' to analyze code written in Java, Kotlin or both
27-
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
28-
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
24+
language: [ 'actions', 'javascript-typescript', 'python' ]
2925

3026
steps:
3127
- name: Checkout repository
32-
uses: actions/checkout@v5
28+
uses: actions/checkout@v6
3329

34-
# Initializes the CodeQL tools for scanning.
3530
- name: Initialize CodeQL
36-
uses: github/codeql-action/init@v3
31+
uses: github/codeql-action/init@v4
3732
with:
3833
languages: ${{ matrix.language }}
39-
# If you wish to specify custom queries, you can do so here or in a config file.
40-
# By default, queries listed here will override any specified in a config file.
41-
# Prefix the list here with "+" to use these queries and those in the config file.
42-
43-
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
44-
# queries: security-extended,security-and-quality
45-
46-
47-
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
48-
# If this step fails, then you should remove it and run the build manually (see below)
49-
- name: Autobuild
50-
uses: github/codeql-action/autobuild@v3
51-
52-
# ℹ️ Command-line programs to run using the OS shell.
53-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
54-
55-
# If the Autobuild fails above, remove it and uncomment the following three lines.
56-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
57-
58-
# - run: |
59-
# echo "Run, Build Application using script"
60-
# ./location_of_script_within_repo/buildscript.sh
34+
build-mode: none
6135

6236
- name: Perform CodeQL Analysis
63-
uses: github/codeql-action/analyze@v3
37+
uses: github/codeql-action/analyze@v4
6438
with:
6539
category: "/language:${{matrix.language}}"

.github/workflows/core.yml

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
- test/**
88
- yt_dlp/**.py
99
- '!yt_dlp/extractor/**.py'
10+
- yt_dlp/extractor/youtube/**.py
1011
- yt_dlp/extractor/__init__.py
1112
- yt_dlp/extractor/common.py
1213
- yt_dlp/extractor/extractors.py
@@ -17,6 +18,7 @@ on:
1718
- test/**
1819
- yt_dlp/**.py
1920
- '!yt_dlp/extractor/**.py'
21+
- yt_dlp/extractor/youtube/**.py
2022
- yt_dlp/extractor/__init__.py
2123
- yt_dlp/extractor/common.py
2224
- yt_dlp/extractor/extractors.py
@@ -53,16 +55,37 @@ jobs:
5355
- os: windows-latest
5456
python-version: pypy-3.11
5557
steps:
56-
- uses: actions/checkout@v5
58+
- uses: actions/checkout@v6
59+
with:
60+
fetch-depth: 0
5761
- name: Set up Python ${{ matrix.python-version }}
5862
uses: actions/setup-python@v6
5963
with:
6064
python-version: ${{ matrix.python-version }}
6165
- name: Install test requirements
62-
run: python3 ./devscripts/install_deps.py --include test --include curl-cffi
66+
run: python ./devscripts/install_deps.py --include-extra test --include-extra curl-cffi
6367
- name: Run tests
6468
timeout-minutes: 15
6569
continue-on-error: False
70+
env:
71+
source: ${{ (github.event_name == 'push' && github.event.before) || 'origin/master' }}
72+
target: ${{ (github.event_name == 'push' && github.event.after) || 'HEAD' }}
73+
shell: bash
6674
run: |
75+
flags=()
76+
# Check if a networking file is involved
77+
patterns="\
78+
^yt_dlp/networking/
79+
^yt_dlp/utils/networking\.py$
80+
^test/test_http_proxy\.py$
81+
^test/test_networking\.py$
82+
^test/test_networking_utils\.py$
83+
^test/test_socks\.py$
84+
^test/test_websockets\.py$
85+
^pyproject\.toml$
86+
"
87+
if git diff --name-only "${source}" "${target}" | grep -Ef <(printf '%s' "${patterns}"); then
88+
flags+=(--flaky)
89+
fi
6790
python3 -m yt_dlp -v || true # Print debug head
68-
python3 ./devscripts/run_tests.py --pytest-args '--reruns 2 --reruns-delay 3.0' core
91+
python3 -m devscripts.run_tests "${flags[@]}" --pytest-args '--reruns 2 --reruns-delay 3.0' core

.github/workflows/download.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ jobs:
99
if: "contains(github.event.head_commit.message, 'ci run dl')"
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v5
12+
- uses: actions/checkout@v6
1313
- name: Set up Python
1414
uses: actions/setup-python@v6
1515
with:
1616
python-version: '3.10'
1717
- name: Install test requirements
18-
run: python3 ./devscripts/install_deps.py --include dev
18+
run: python ./devscripts/install_deps.py --include-extra dev
1919
- name: Run tests
2020
continue-on-error: true
21-
run: python3 ./devscripts/run_tests.py download
21+
run: python ./devscripts/run_tests.py download
2222

2323
full:
2424
name: Full Download Tests
@@ -36,13 +36,13 @@ jobs:
3636
- os: windows-latest
3737
python-version: pypy-3.11
3838
steps:
39-
- uses: actions/checkout@v5
39+
- uses: actions/checkout@v6
4040
- name: Set up Python ${{ matrix.python-version }}
4141
uses: actions/setup-python@v6
4242
with:
4343
python-version: ${{ matrix.python-version }}
4444
- name: Install test requirements
45-
run: python3 ./devscripts/install_deps.py --include dev
45+
run: python ./devscripts/install_deps.py --include-extra dev
4646
- name: Run tests
4747
continue-on-error: true
48-
run: python3 ./devscripts/run_tests.py download
48+
run: python ./devscripts/run_tests.py download

0 commit comments

Comments
 (0)