Compare commits
26 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
872be1ead1 | ||
|
|
c735633bea | ||
|
|
42fdd3ce6a | ||
|
|
867a974914 | ||
|
|
10b91c5217 |
||
|
|
285db11a03 |
||
|
|
8a8fa40127 |
||
|
|
e670aadef4 |
||
|
|
b7688c102a |
||
|
|
24e233f6dc |
||
|
|
83016da260 |
||
|
|
8841f17ca5 |
||
|
|
f7a988be06 | ||
|
|
20084687dc | ||
|
|
5be0950134 | ||
|
|
e745908aec | ||
|
|
6b9deb5086 | ||
|
|
0b3bfa128f | ||
|
|
bb236482e6 | ||
|
|
9690485ec7 | ||
|
|
699b594e50 | ||
|
|
50a4a661a1 | ||
|
|
429a67881c | ||
|
|
c070263390 | ||
|
|
64d87fdda4 | ||
|
|
3093ca0390 |
6 changed files with 351 additions and 280 deletions
17
.gitignore
vendored
17
.gitignore
vendored
|
|
@ -42,3 +42,20 @@
|
|||
/yt-dlp-2024.08.01.tar.gz
|
||||
/yt-dlp-2024.08.06.tar.gz
|
||||
/yt-dlp-2024.09.27.tar.gz
|
||||
/yt-dlp-2024.10.07.tar.gz
|
||||
/yt-dlp-2024.10.22.tar.gz
|
||||
/yt-dlp-2024.11.04.tar.gz
|
||||
/yt-dlp-2024.11.18.tar.gz
|
||||
/yt-dlp-2024.12.23.tar.gz
|
||||
/yt-dlp-2025.01.12.tar.gz
|
||||
/yt-dlp-2025.01.15.tar.gz
|
||||
/yt-dlp-2025.01.26.tar.gz
|
||||
/yt-dlp-2025.02.19.tar.gz
|
||||
/yt-dlp-2025.03.26.tar.gz
|
||||
/yt-dlp-2025.03.31.tar.gz
|
||||
/yt-dlp-2025.04.30.tar.gz
|
||||
/yt-dlp-2025.05.22.tar.gz
|
||||
/yt-dlp-2025.06.09.tar.gz
|
||||
/yt-dlp-2025.06.25.tar.gz
|
||||
/yt-dlp-2025.06.30.tar.gz
|
||||
/yt-dlp-2025.07.21.tar.gz
|
||||
|
|
|
|||
119
0001-Revert-rh-websockets-Upgrade-websockets-to-13.0-1081.patch
Normal file
119
0001-Revert-rh-websockets-Upgrade-websockets-to-13.0-1081.patch
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
From fbc486f4fac78bfd49011c1b60362e656c679c71 Mon Sep 17 00:00:00 2001
|
||||
From: Maxwell G <maxwell@gtmx.me>
|
||||
Date: Mon, 6 Jan 2025 14:37:58 -0600
|
||||
Subject: [PATCH 1/2] Revert "[rh:websockets] Upgrade websockets to 13.0
|
||||
(#10815)"
|
||||
|
||||
This reverts commit 6f9e6537434562d513d0c9b68ced8a61ade94a64.
|
||||
---
|
||||
.github/workflows/core.yml | 1 -
|
||||
.github/workflows/quick-test.yml | 1 -
|
||||
pyproject.toml | 2 +-
|
||||
test/test_websockets.py | 8 ++++----
|
||||
yt_dlp/networking/_websockets.py | 5 ++++-
|
||||
5 files changed, 9 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml
|
||||
index 9a4342a58..bed3af94b 100644
|
||||
--- a/.github/workflows/core.yml
|
||||
+++ b/.github/workflows/core.yml
|
||||
@@ -59,7 +59,6 @@ jobs:
|
||||
- name: Install test requirements
|
||||
run: python3 ./devscripts/install_deps.py --include test --include curl-cffi
|
||||
- name: Run tests
|
||||
- timeout-minutes: 15
|
||||
continue-on-error: False
|
||||
run: |
|
||||
python3 -m yt_dlp -v || true # Print debug head
|
||||
diff --git a/.github/workflows/quick-test.yml b/.github/workflows/quick-test.yml
|
||||
index 1a32bbfe3..235a2c64d 100644
|
||||
--- a/.github/workflows/quick-test.yml
|
||||
+++ b/.github/workflows/quick-test.yml
|
||||
@@ -17,7 +17,6 @@ jobs:
|
||||
- name: Install test requirements
|
||||
run: python3 ./devscripts/install_deps.py -o --include test
|
||||
- name: Run tests
|
||||
- timeout-minutes: 15
|
||||
run: |
|
||||
python3 -m yt_dlp -v || true
|
||||
python3 ./devscripts/run_tests.py --pytest-args '--reruns 2 --reruns-delay 3.0' core
|
||||
diff --git a/pyproject.toml b/pyproject.toml
|
||||
index 5e987a6fd..6810415d1 100644
|
||||
--- a/pyproject.toml
|
||||
+++ b/pyproject.toml
|
||||
@@ -52,7 +52,7 @@ default = [
|
||||
"pycryptodomex",
|
||||
"requests>=2.32.2,<3",
|
||||
"urllib3>=1.26.17,<3",
|
||||
- "websockets>=13.0",
|
||||
+ "websockets>=12.0",
|
||||
]
|
||||
curl-cffi = [
|
||||
"curl-cffi>=0.5.10,!=0.6.*,!=0.7.*,!=0.8.*,!=0.9.*,<0.11; implementation_name=='cpython'",
|
||||
diff --git a/test/test_websockets.py b/test/test_websockets.py
|
||||
index dead5fe5c..5e0ce48cc 100644
|
||||
--- a/test/test_websockets.py
|
||||
+++ b/test/test_websockets.py
|
||||
@@ -88,7 +88,7 @@ def create_wss_websocket_server():
|
||||
certfn = os.path.join(TEST_DIR, 'testcert.pem')
|
||||
sslctx = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
|
||||
sslctx.load_cert_chain(certfn, None)
|
||||
- return create_websocket_server(ssl=sslctx)
|
||||
+ return create_websocket_server(ssl_context=sslctx)
|
||||
|
||||
|
||||
MTLS_CERT_DIR = os.path.join(TEST_DIR, 'testdata', 'certificate')
|
||||
@@ -103,7 +103,7 @@ def create_mtls_wss_websocket_server():
|
||||
sslctx.load_verify_locations(cafile=cacertfn)
|
||||
sslctx.load_cert_chain(certfn, None)
|
||||
|
||||
- return create_websocket_server(ssl=sslctx)
|
||||
+ return create_websocket_server(ssl_context=sslctx)
|
||||
|
||||
|
||||
def create_legacy_wss_websocket_server():
|
||||
@@ -112,7 +112,7 @@ def create_legacy_wss_websocket_server():
|
||||
sslctx.maximum_version = ssl.TLSVersion.TLSv1_2
|
||||
sslctx.set_ciphers('SHA1:AESCCM:aDSS:eNULL:aNULL')
|
||||
sslctx.load_cert_chain(certfn, None)
|
||||
- return create_websocket_server(ssl=sslctx)
|
||||
+ return create_websocket_server(ssl_context=sslctx)
|
||||
|
||||
|
||||
def ws_validate_and_send(rh, req):
|
||||
@@ -139,7 +139,7 @@ def setup_class(cls):
|
||||
cls.wss_thread, cls.wss_port = create_wss_websocket_server()
|
||||
cls.wss_base_url = f'wss://127.0.0.1:{cls.wss_port}'
|
||||
|
||||
- cls.bad_wss_thread, cls.bad_wss_port = create_websocket_server(ssl=ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER))
|
||||
+ cls.bad_wss_thread, cls.bad_wss_port = create_websocket_server(ssl_context=ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER))
|
||||
cls.bad_wss_host = f'wss://127.0.0.1:{cls.bad_wss_port}'
|
||||
|
||||
cls.mtls_wss_thread, cls.mtls_wss_port = create_mtls_wss_websocket_server()
|
||||
diff --git a/yt_dlp/networking/_websockets.py b/yt_dlp/networking/_websockets.py
|
||||
index d29f8e45a..a2bdb9c82 100644
|
||||
--- a/yt_dlp/networking/_websockets.py
|
||||
+++ b/yt_dlp/networking/_websockets.py
|
||||
@@ -48,7 +48,10 @@
|
||||
# 2: "AttributeError: 'ClientConnection' object has no attribute 'recv_events_exc'. Did you mean: 'recv_events'?"
|
||||
import websockets.sync.connection # isort: split
|
||||
with contextlib.suppress(Exception):
|
||||
+ # > 12.0
|
||||
websockets.sync.connection.Connection.recv_exc = None
|
||||
+ # 12.0
|
||||
+ websockets.sync.connection.Connection.recv_events_exc = None
|
||||
|
||||
|
||||
class WebsocketsResponseAdapter(WebSocketResponse):
|
||||
@@ -162,7 +165,7 @@ def _send(self, request):
|
||||
additional_headers=headers,
|
||||
open_timeout=timeout,
|
||||
user_agent_header=None,
|
||||
- ssl=ssl_ctx if wsuri.secure else None,
|
||||
+ ssl_context=ssl_ctx if wsuri.secure else None,
|
||||
close_timeout=0, # not ideal, but prevents yt-dlp hanging
|
||||
)
|
||||
return WebsocketsResponseAdapter(conn, url=request.url)
|
||||
--
|
||||
2.48.1
|
||||
|
||||
180
changelog
Normal file
180
changelog
Normal file
|
|
@ -0,0 +1,180 @@
|
|||
* Mon Nov 18 2024 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 2024.11.18-1
|
||||
- Update to 2024.11.18. Fixes rhbz#2326919
|
||||
|
||||
* Tue Nov 05 2024 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 2024.11.04-1
|
||||
- Update to 2024.11.04. Fixes rhbz#2323783
|
||||
|
||||
* Wed Oct 23 2024 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 2024.10.22-1
|
||||
- Update to 2024.10.22. Fixes rhbz#2321221
|
||||
|
||||
* Tue Oct 08 2024 Maxwell G <maxwell@gtmx.me> - 2024.10.07-1
|
||||
- Update to 2024.10.07.
|
||||
|
||||
* Sat Sep 28 2024 Maxwell G <maxwell@gtmx.me> - 2024.09.27-1
|
||||
- Update to 2024.09.27.
|
||||
|
||||
* Mon Aug 12 2024 Maxwell G <maxwell@gtmx.me> - 2024.08.06-1
|
||||
- Update to 2024.08.06. Fixes rhbz#2303069.
|
||||
|
||||
* Sat Aug 03 2024 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 2024.08.01-1
|
||||
- Update to 2024.08.01. Fixes rhbz#2302522
|
||||
|
||||
* Fri Jul 26 2024 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 2024.07.25-1
|
||||
- Update to 2024.07.25. Fixes rhbz#2300087
|
||||
|
||||
* Wed Jul 24 2024 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 2024.07.16-1
|
||||
- Update to 2024.07.16. Fixes rhbz#2298550
|
||||
|
||||
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2024.07.09-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Thu Jul 11 2024 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 2024.07.09-1
|
||||
- Update to 2024.07.09. Fixes rhbz#2297344
|
||||
|
||||
* Mon Jul 08 2024 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 2024.07.07-1
|
||||
- Update to 2024.07.07. Fixes rhbz#2296356
|
||||
|
||||
* Thu Jul 04 2024 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 2024.07.02-1
|
||||
- Update to 2024.07.02. Fixes rhbz#2295769
|
||||
|
||||
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 2024.05.27-2
|
||||
- Rebuilt for Python 3.13
|
||||
|
||||
* Wed May 29 2024 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 2024.05.27-1
|
||||
- Update to 2024.05.27. Fixes rhbz#2283578.
|
||||
|
||||
* Mon May 27 2024 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 2024.05.26-1
|
||||
- Update to 2024.05.26. Fixes rhbz#2274266.
|
||||
|
||||
* Wed Apr 10 2024 Maxwell G <maxwell@gtmx.me> - 2024.04.09-1
|
||||
- Update to 2024.04.09.
|
||||
|
||||
* Wed Mar 13 2024 Maxwell G <maxwell@gtmx.me> - 2024.03.10-1
|
||||
- Update to 2024.03.10. Fixes rhbz#2268944.
|
||||
|
||||
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2023.12.30-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Wed Jan 3 2024 Maxwell G <maxwell@gtmx.me> - 2023.12.30-1
|
||||
- Update to 2023.12.30. Fixes rhbz#2244200.
|
||||
|
||||
* Wed Oct 11 2023 Marcus Müller <marcus_fedora@baseband.digital> - 2023.10.07-1
|
||||
- Update to 2023.10.07.
|
||||
- Fixes rhbz#2243274
|
||||
- Fixes rhbz#2240465
|
||||
|
||||
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2023.07.06-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Fri Jul 07 2023 Maxwell G <maxwell@gtmx.me> - 2023.07.06-1
|
||||
- Update to 2023.07.06.
|
||||
- Mitigates CVE-2023-35934 / GHSA-v8mc-9377-rwjj
|
||||
|
||||
* Wed Jul 05 2023 Maxwell G <maxwell@gtmx.me> - 2023.06.22-1
|
||||
- Update to 2023.06.22. Fixes rhbz#2216612.
|
||||
|
||||
* Thu Jun 22 2023 Maxwell G <maxwell@gtmx.me> - 2023.06.21-1
|
||||
- Update to 2023.06.21. Fixes rhbz#2216612.
|
||||
|
||||
* Thu Jun 15 2023 Python Maint <python-maint@redhat.com> - 2023.03.04-2
|
||||
- Rebuilt for Python 3.12
|
||||
|
||||
* Mon Mar 06 2023 Maxwell G <maxwell@gtmx.me> - 2023.03.04-1
|
||||
- Update to 2023.03.04. Fixes rhbz#2175395.
|
||||
|
||||
* Fri Feb 17 2023 Maxwell G <maxwell@gtmx.me> - 2023.02.17-1
|
||||
- Update to 2023.02.17.
|
||||
|
||||
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2023.01.06-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Tue Jan 10 2023 Maxwell G <gotmax@e.email> - 2023.01.06-1
|
||||
- Update to 2023.01.06. Fixes rhbz#2157879.
|
||||
|
||||
* Mon Nov 14 2022 Maxwell G <gotmax@e.email> - 2022.11.11-1
|
||||
- Update to 2022.11.11. Fixes rhbz#2142417.
|
||||
|
||||
* Sat Oct 08 2022 Maxwell G <gotmax@e.email> - 2022.10.04-1
|
||||
- Update to 2022.10.04. Fixes rhbz#2132726.
|
||||
|
||||
* Fri Sep 02 2022 Maxwell G <gotmax@e.email> - 2022.09.01-1
|
||||
- Update to 2022.09.01. Fixes rhbz#2123442.
|
||||
|
||||
* Fri Aug 19 2022 Maxwell G <gotmax@e.email> - 2022.08.19-1
|
||||
- Update to 2022.08.19. Fixes rhbz#2118224.
|
||||
|
||||
* Tue Aug 09 2022 Maxwell G <gotmax@e.email> - 2022.08.08-1
|
||||
- Update to 2022.08.08.
|
||||
|
||||
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2022.06.29-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Mon Jul 04 2022 Maxwell G <gotmax@e.email> - 2022.06.29-2
|
||||
- Fix shell completions subpackages
|
||||
|
||||
* Mon Jul 04 2022 Maxwell G <gotmax@e.email> - 2022.06.29-1
|
||||
- Update to 2022.06.29. Fixes rhbz#2102238.
|
||||
|
||||
* Thu Jun 23 2022 Maxwell G <gotmax@e.email> - 2022.06.22.1-1
|
||||
- Update to 2022.06.22.1. Fixes rhbz#2100019.
|
||||
|
||||
* Fri Jun 17 2022 Maxwell G <gotmax@e.email> - 2022.05.18-3
|
||||
- Fix gating configuration
|
||||
|
||||
* Thu Jun 16 2022 Python Maint <python-maint@redhat.com> - 2022.05.18-2
|
||||
- Rebuilt for Python 3.11
|
||||
|
||||
* Tue May 24 2022 Maxwell G <gotmax@e.email> - 2022.05.18-1
|
||||
- Update to 2022.05.18. Fixes rhbz#2088564.
|
||||
|
||||
* Fri Apr 08 2022 Maxwell G <gotmax@e.email> - 2022.04.08-1
|
||||
- Update to 2022.04.08. Fixes rhbz#2073359.
|
||||
|
||||
* Sat Mar 12 2022 Artem Polishchuk <ego.cordatus@gmail.com> - 2022.03.08.1-2
|
||||
- build: Make ffmpeg and ffprobe conditional deps for >= f36 only
|
||||
|
||||
* Thu Mar 10 2022 Maxwell G <gotmax@e.email> - 2022.03.08.1-1
|
||||
- Update to 2022.03.08.1. Fixes rhbz#2061973.
|
||||
|
||||
* Mon Mar 07 2022 Maxwell G <gotmax@e.email> - 2022.02.04-2
|
||||
- Add weak dependency on ffmpeg and ffprobe.
|
||||
- Make shell-completion subpackages optional again.
|
||||
|
||||
* Fri Feb 04 2022 Maxwell G <gotmax@e.email> - 2022.2.4-1
|
||||
- Update to 2022.2.4. Fixes rhbz#2050497.
|
||||
|
||||
* Mon Jan 24 2022 Maxwell G <gotmax@e.email> - 2022.01.21-1
|
||||
- Update to 2022.01.21.
|
||||
|
||||
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2021.12.27-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Mon Dec 27 2021 Maxwell G <gotmax@e.email> - 2021.12.27-1
|
||||
- Update to 2021.12.27.
|
||||
|
||||
* Sun Dec 26 2021 Maxwell G <gotmax@e.email> - 2021.12.25-1
|
||||
- Update to 2021.12.25.
|
||||
|
||||
* Wed Dec 01 2021 Maxwell G <gotmax@e.email> - 2021.12.01-1
|
||||
- Update to 2021.12.01.
|
||||
|
||||
* Tue Nov 9 2021 Maxwell G <gotmax@e.email> - 2021.11.10.1-1
|
||||
- Update to 2021.11.10.1.
|
||||
|
||||
* Tue Nov 9 2021 Maxwell G <gotmax@e.email> - 2021.10.22-2
|
||||
- Skip installing unnecessary tox dependencies
|
||||
- Fix shell-completion subpackages
|
||||
- Only package README.md; don't generate extra README.txt
|
||||
|
||||
* Sat Oct 23 2021 Maxwell G <gotmax@e.email> - 2021.10.22-1
|
||||
- Update to 2021.10.22
|
||||
|
||||
* Sun Oct 10 2021 Maxwell G <gotmax@e.email> - 2021.10.10-1
|
||||
- Mark LICENSE with %%license instead of %%doc
|
||||
- Update to 2021.10.10
|
||||
- Fix non-executable-script rpmlint error
|
||||
- Use `python3dist(NAME)` for dependencies
|
||||
- Fix rpm-buildroot-usage rpmlint error
|
||||
|
||||
* Sat Oct 9 2021 Maxwell G <gotmax@e.email> - 2021.10.09-1
|
||||
- Initial package
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (yt-dlp-2024.09.27.tar.gz) = 8c518aae18d049495def31dad1e81374ff7a2f1b136356c574d97643c6bbde37f757f74d77c519a8782c4d69668db80f367a21424923f249e82491c14f4880e8
|
||||
SHA512 (yt-dlp-2025.06.30.tar.gz) = 06f1c332de89eb0df7bf455d0c4917183bb508060653af96e96cb45c366c2d53da93d192e9327a1c678abff7b37d2a10fa9eb4d07cac14ff105d6e7130f0ae27
|
||||
|
|
|
|||
|
|
@ -1,77 +0,0 @@
|
|||
diff --git a/pyproject.toml b/pyproject.toml
|
||||
index d5480e1c6d73..fe6894a42838 100644
|
||||
--- a/pyproject.toml
|
||||
+++ b/pyproject.toml
|
||||
@@ -49,7 +49,7 @@ dependencies = [
|
||||
"pycryptodomex",
|
||||
"requests>=2.32.2,<3",
|
||||
"urllib3>=1.26.17,<3",
|
||||
- "websockets>=12.0",
|
||||
+ "websockets>=13.0",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
diff --git a/test/test_websockets.py b/test/test_websockets.py
|
||||
index 43f20ac655ad..06112cc0b8fb 100644
|
||||
--- a/test/test_websockets.py
|
||||
+++ b/test/test_websockets.py
|
||||
@@ -88,7 +88,7 @@ def create_wss_websocket_server():
|
||||
certfn = os.path.join(TEST_DIR, 'testcert.pem')
|
||||
sslctx = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
|
||||
sslctx.load_cert_chain(certfn, None)
|
||||
- return create_websocket_server(ssl_context=sslctx)
|
||||
+ return create_websocket_server(ssl=sslctx)
|
||||
|
||||
|
||||
MTLS_CERT_DIR = os.path.join(TEST_DIR, 'testdata', 'certificate')
|
||||
@@ -103,7 +103,7 @@ def create_mtls_wss_websocket_server():
|
||||
sslctx.load_verify_locations(cafile=cacertfn)
|
||||
sslctx.load_cert_chain(certfn, None)
|
||||
|
||||
- return create_websocket_server(ssl_context=sslctx)
|
||||
+ return create_websocket_server(ssl=sslctx)
|
||||
|
||||
|
||||
def create_legacy_wss_websocket_server():
|
||||
@@ -112,7 +112,7 @@ def create_legacy_wss_websocket_server():
|
||||
sslctx.maximum_version = ssl.TLSVersion.TLSv1_2
|
||||
sslctx.set_ciphers('SHA1:AESCCM:aDSS:eNULL:aNULL')
|
||||
sslctx.load_cert_chain(certfn, None)
|
||||
- return create_websocket_server(ssl_context=sslctx)
|
||||
+ return create_websocket_server(ssl=sslctx)
|
||||
|
||||
|
||||
def ws_validate_and_send(rh, req):
|
||||
@@ -139,7 +139,7 @@ def setup_class(cls):
|
||||
cls.wss_thread, cls.wss_port = create_wss_websocket_server()
|
||||
cls.wss_base_url = f'wss://127.0.0.1:{cls.wss_port}'
|
||||
|
||||
- cls.bad_wss_thread, cls.bad_wss_port = create_websocket_server(ssl_context=ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER))
|
||||
+ cls.bad_wss_thread, cls.bad_wss_port = create_websocket_server(ssl=ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER))
|
||||
cls.bad_wss_host = f'wss://127.0.0.1:{cls.bad_wss_port}'
|
||||
|
||||
cls.mtls_wss_thread, cls.mtls_wss_port = create_mtls_wss_websocket_server()
|
||||
diff --git a/yt_dlp/networking/_websockets.py b/yt_dlp/networking/_websockets.py
|
||||
index 492af1154de7..21b765b91dc8 100644
|
||||
--- a/yt_dlp/networking/_websockets.py
|
||||
+++ b/yt_dlp/networking/_websockets.py
|
||||
@@ -47,10 +47,7 @@
|
||||
# 2: "AttributeError: 'ClientConnection' object has no attribute 'recv_events_exc'. Did you mean: 'recv_events'?"
|
||||
import websockets.sync.connection # isort: split
|
||||
with contextlib.suppress(Exception):
|
||||
- # > 12.0
|
||||
websockets.sync.connection.Connection.recv_exc = None
|
||||
- # 12.0
|
||||
- websockets.sync.connection.Connection.recv_events_exc = None
|
||||
|
||||
|
||||
class WebsocketsResponseAdapter(WebSocketResponse):
|
||||
@@ -162,7 +159,7 @@ def _send(self, request):
|
||||
additional_headers=headers,
|
||||
open_timeout=timeout,
|
||||
user_agent_header=None,
|
||||
- ssl_context=ssl_ctx if wsuri.secure else None,
|
||||
+ ssl=ssl_ctx if wsuri.secure else None,
|
||||
close_timeout=0, # not ideal, but prevents yt-dlp hanging
|
||||
)
|
||||
return WebsocketsResponseAdapter(conn, url=request.url)
|
||||
236
yt-dlp.spec
236
yt-dlp.spec
|
|
@ -2,33 +2,31 @@
|
|||
# SPDX-License-Identifier: MIT
|
||||
# SPDX-FileCopyrightText: Fedora Project Authors
|
||||
# SPDX-FileCopyrightText: 2022 Maxwell G <gotmax@e.email>
|
||||
# See %%{name}.spec.license for the full license text.
|
||||
# See yt-dlp.spec.license for the full license text.
|
||||
|
||||
%bcond_without tests
|
||||
|
||||
Name: yt-dlp
|
||||
Version: 2024.09.27
|
||||
Release: 1%{?dist}
|
||||
Version: 2025.06.30
|
||||
Release: %autorelease
|
||||
Summary: A command-line program to download videos from online video platforms
|
||||
|
||||
License: Unlicense
|
||||
URL: https://github.com/%{name}/%{name}
|
||||
Source: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
|
||||
URL: https://github.com/yt-dlp/yt-dlp
|
||||
Source: %{url}/archive/%{version}/yt-dlp-%{version}.tar.gz
|
||||
# License of the specfile
|
||||
Source: yt-dlp.spec.license
|
||||
|
||||
# https://github.com/yt-dlp/yt-dlp/commit/6f9e6537434562d513d0c9b68ced8a61ade94a64
|
||||
# [rh:websockets] Upgrade websockets to 13.0 (#10815)
|
||||
# Revert this patch for compatibility with older Fedora versions
|
||||
Patch1000: websockets-13.patch
|
||||
# This patch is applied conditionally to Fedora <= 41
|
||||
Patch1000: 0001-Revert-rh-websockets-Upgrade-websockets-to-13.0-1081.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: python3-devel
|
||||
|
||||
# Needed for %%prep
|
||||
BuildRequires: tomcli
|
||||
|
||||
%if %{with tests}
|
||||
# Needed for %%check
|
||||
BuildRequires: %{py3_dist pytest}
|
||||
|
|
@ -38,6 +36,8 @@ BuildRequires: %{py3_dist pytest}
|
|||
BuildRequires: pandoc
|
||||
BuildRequires: make
|
||||
|
||||
Requires: yt-dlp+default = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
|
||||
# ffmpeg-free is now available in Fedora.
|
||||
Recommends: /usr/bin/ffmpeg
|
||||
Recommends: /usr/bin/ffprobe
|
||||
|
|
@ -52,47 +52,45 @@ additional features and fixes.}
|
|||
%description %{_description}
|
||||
|
||||
%package bash-completion
|
||||
Summary: Bash completion for %{name}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Summary: Bash completion for yt-dlp
|
||||
Requires: yt-dlp = %{version}-%{release}
|
||||
Requires: bash-completion
|
||||
Supplements: (%{name} and bash-completion)
|
||||
Supplements: (yt-dlp and bash-completion)
|
||||
|
||||
%description bash-completion
|
||||
Bash command line completion support for %{name}.
|
||||
Bash command line completion support for yt-dlp.
|
||||
|
||||
%package zsh-completion
|
||||
Summary: Zsh completion for %{name}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Summary: Zsh completion for yt-dlp
|
||||
Requires: yt-dlp = %{version}-%{release}
|
||||
Requires: zsh
|
||||
Supplements: (%{name} and zsh)
|
||||
Supplements: (yt-dlp and zsh)
|
||||
|
||||
%description zsh-completion
|
||||
Zsh command line completion support for %{name}.
|
||||
Zsh command line completion support for yt-dlp.
|
||||
|
||||
%package fish-completion
|
||||
Summary: Fish completion for %{name}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Summary: Fish completion for yt-dlp
|
||||
Requires: yt-dlp = %{version}-%{release}
|
||||
Requires: fish
|
||||
Supplements: (%{name} and fish)
|
||||
Supplements: (yt-dlp and fish)
|
||||
|
||||
%description fish-completion
|
||||
Fish command line completion support for %{name}.
|
||||
Fish command line completion support for yt-dlp.
|
||||
|
||||
%prep
|
||||
%autosetup -N
|
||||
%if %{defined fedora} && %{fedora} <= 41
|
||||
%autopatch -M 999 -p1
|
||||
%if %{defined fedora} && 0%{?fedora} <= 41
|
||||
# Revert patch for compatibility with older websockets
|
||||
%patch -P1000 -p1 -R
|
||||
%autopatch 1000 -p1
|
||||
%endif
|
||||
|
||||
# Remove unnecessary shebangs
|
||||
find -type f ! -executable -name '*.py' -print -exec sed -i -e '1{\@^#!.*@d}' '{}' +
|
||||
# Relax version constraints
|
||||
tomcli-set pyproject.toml lists replace project.dependencies \
|
||||
'(requests|urllib3|websockets)>=.*' '\1'
|
||||
|
||||
%generate_buildrequires
|
||||
%pyproject_buildrequires -r
|
||||
%pyproject_buildrequires -x default,secretstorage
|
||||
|
||||
%build
|
||||
# Docs and shell completions
|
||||
|
|
@ -107,191 +105,25 @@ make yt-dlp.1 completion-bash completion-zsh completion-fish
|
|||
|
||||
%check
|
||||
%if %{with tests}
|
||||
# See https://github.com/yt-dlp/yt-dlp/blob/master/devscripts/run_tests.sh
|
||||
%pytest -k "not download"
|
||||
%pytest -k "not download and not test_verify_cert[Websockets]"
|
||||
%endif
|
||||
|
||||
%files -f %{pyproject_files}
|
||||
%{_bindir}/%{name}
|
||||
%{_mandir}/man1/%{name}.1*
|
||||
%{_bindir}/yt-dlp
|
||||
%{_mandir}/man1/yt-dlp.1*
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
|
||||
%files bash-completion
|
||||
%{bash_completions_dir}/%{name}
|
||||
%{bash_completions_dir}/yt-dlp
|
||||
|
||||
%files zsh-completion
|
||||
%{zsh_completions_dir}/_%{name}
|
||||
%{zsh_completions_dir}/_yt-dlp
|
||||
|
||||
%files fish-completion
|
||||
%{fish_completions_dir}/%{name}.fish
|
||||
%{fish_completions_dir}/yt-dlp.fish
|
||||
|
||||
%pyproject_extras_subpkg -n yt-dlp default secretstorage
|
||||
|
||||
%changelog
|
||||
* Sat Sep 28 2024 Maxwell G <maxwell@gtmx.me> - 2024.09.27-1
|
||||
- Update to 2024.09.27.
|
||||
|
||||
* Mon Aug 12 2024 Maxwell G <maxwell@gtmx.me> - 2024.08.06-1
|
||||
- Update to 2024.08.06. Fixes rhbz#2303069.
|
||||
|
||||
* Sat Aug 03 2024 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 2024.08.01-1
|
||||
- Update to 2024.08.01. Fixes rhbz#2302522
|
||||
|
||||
* Fri Jul 26 2024 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 2024.07.25-1
|
||||
- Update to 2024.07.25. Fixes rhbz#2300087
|
||||
|
||||
* Wed Jul 24 2024 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 2024.07.16-1
|
||||
- Update to 2024.07.16. Fixes rhbz#2298550
|
||||
|
||||
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2024.07.09-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Thu Jul 11 2024 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 2024.07.09-1
|
||||
- Update to 2024.07.09. Fixes rhbz#2297344
|
||||
|
||||
* Mon Jul 08 2024 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 2024.07.07-1
|
||||
- Update to 2024.07.07. Fixes rhbz#2296356
|
||||
|
||||
* Thu Jul 04 2024 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 2024.07.02-1
|
||||
- Update to 2024.07.02. Fixes rhbz#2295769
|
||||
|
||||
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 2024.05.27-2
|
||||
- Rebuilt for Python 3.13
|
||||
|
||||
* Wed May 29 2024 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 2024.05.27-1
|
||||
- Update to 2024.05.27. Fixes rhbz#2283578.
|
||||
|
||||
* Mon May 27 2024 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 2024.05.26-1
|
||||
- Update to 2024.05.26. Fixes rhbz#2274266.
|
||||
|
||||
* Wed Apr 10 2024 Maxwell G <maxwell@gtmx.me> - 2024.04.09-1
|
||||
- Update to 2024.04.09.
|
||||
|
||||
* Wed Mar 13 2024 Maxwell G <maxwell@gtmx.me> - 2024.03.10-1
|
||||
- Update to 2024.03.10. Fixes rhbz#2268944.
|
||||
|
||||
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2023.12.30-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Wed Jan 3 2024 Maxwell G <maxwell@gtmx.me> - 2023.12.30-1
|
||||
- Update to 2023.12.30. Fixes rhbz#2244200.
|
||||
|
||||
* Wed Oct 11 2023 Marcus Müller <marcus_fedora@baseband.digital> - 2023.10.07-1
|
||||
- Update to 2023.10.07.
|
||||
- Fixes rhbz#2243274
|
||||
- Fixes rhbz#2240465
|
||||
|
||||
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2023.07.06-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Fri Jul 07 2023 Maxwell G <maxwell@gtmx.me> - 2023.07.06-1
|
||||
- Update to 2023.07.06.
|
||||
- Mitigates CVE-2023-35934 / GHSA-v8mc-9377-rwjj
|
||||
|
||||
* Wed Jul 05 2023 Maxwell G <maxwell@gtmx.me> - 2023.06.22-1
|
||||
- Update to 2023.06.22. Fixes rhbz#2216612.
|
||||
|
||||
* Thu Jun 22 2023 Maxwell G <maxwell@gtmx.me> - 2023.06.21-1
|
||||
- Update to 2023.06.21. Fixes rhbz#2216612.
|
||||
|
||||
* Thu Jun 15 2023 Python Maint <python-maint@redhat.com> - 2023.03.04-2
|
||||
- Rebuilt for Python 3.12
|
||||
|
||||
* Mon Mar 06 2023 Maxwell G <maxwell@gtmx.me> - 2023.03.04-1
|
||||
- Update to 2023.03.04. Fixes rhbz#2175395.
|
||||
|
||||
* Fri Feb 17 2023 Maxwell G <maxwell@gtmx.me> - 2023.02.17-1
|
||||
- Update to 2023.02.17.
|
||||
|
||||
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2023.01.06-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Tue Jan 10 2023 Maxwell G <gotmax@e.email> - 2023.01.06-1
|
||||
- Update to 2023.01.06. Fixes rhbz#2157879.
|
||||
|
||||
* Mon Nov 14 2022 Maxwell G <gotmax@e.email> - 2022.11.11-1
|
||||
- Update to 2022.11.11. Fixes rhbz#2142417.
|
||||
|
||||
* Sat Oct 08 2022 Maxwell G <gotmax@e.email> - 2022.10.04-1
|
||||
- Update to 2022.10.04. Fixes rhbz#2132726.
|
||||
|
||||
* Fri Sep 02 2022 Maxwell G <gotmax@e.email> - 2022.09.01-1
|
||||
- Update to 2022.09.01. Fixes rhbz#2123442.
|
||||
|
||||
* Fri Aug 19 2022 Maxwell G <gotmax@e.email> - 2022.08.19-1
|
||||
- Update to 2022.08.19. Fixes rhbz#2118224.
|
||||
|
||||
* Tue Aug 09 2022 Maxwell G <gotmax@e.email> - 2022.08.08-1
|
||||
- Update to 2022.08.08.
|
||||
|
||||
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2022.06.29-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Mon Jul 04 2022 Maxwell G <gotmax@e.email> - 2022.06.29-2
|
||||
- Fix shell completions subpackages
|
||||
|
||||
* Mon Jul 04 2022 Maxwell G <gotmax@e.email> - 2022.06.29-1
|
||||
- Update to 2022.06.29. Fixes rhbz#2102238.
|
||||
|
||||
* Thu Jun 23 2022 Maxwell G <gotmax@e.email> - 2022.06.22.1-1
|
||||
- Update to 2022.06.22.1. Fixes rhbz#2100019.
|
||||
|
||||
* Fri Jun 17 2022 Maxwell G <gotmax@e.email> - 2022.05.18-3
|
||||
- Fix gating configuration
|
||||
|
||||
* Thu Jun 16 2022 Python Maint <python-maint@redhat.com> - 2022.05.18-2
|
||||
- Rebuilt for Python 3.11
|
||||
|
||||
* Tue May 24 2022 Maxwell G <gotmax@e.email> - 2022.05.18-1
|
||||
- Update to 2022.05.18. Fixes rhbz#2088564.
|
||||
|
||||
* Fri Apr 08 2022 Maxwell G <gotmax@e.email> - 2022.04.08-1
|
||||
- Update to 2022.04.08. Fixes rhbz#2073359.
|
||||
|
||||
* Sat Mar 12 2022 Artem Polishchuk <ego.cordatus@gmail.com> - 2022.03.08.1-2
|
||||
- build: Make ffmpeg and ffprobe conditional deps for >= f36 only
|
||||
|
||||
* Thu Mar 10 2022 Maxwell G <gotmax@e.email> - 2022.03.08.1-1
|
||||
- Update to 2022.03.08.1. Fixes rhbz#2061973.
|
||||
|
||||
* Mon Mar 07 2022 Maxwell G <gotmax@e.email> - 2022.02.04-2
|
||||
- Add weak dependency on ffmpeg and ffprobe.
|
||||
- Make shell-completion subpackages optional again.
|
||||
|
||||
* Fri Feb 04 2022 Maxwell G <gotmax@e.email> - 2022.2.4-1
|
||||
- Update to 2022.2.4. Fixes rhbz#2050497.
|
||||
|
||||
* Mon Jan 24 2022 Maxwell G <gotmax@e.email> - 2022.01.21-1
|
||||
- Update to 2022.01.21.
|
||||
|
||||
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2021.12.27-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Mon Dec 27 2021 Maxwell G <gotmax@e.email> - 2021.12.27-1
|
||||
- Update to 2021.12.27.
|
||||
|
||||
* Sun Dec 26 2021 Maxwell G <gotmax@e.email> - 2021.12.25-1
|
||||
- Update to 2021.12.25.
|
||||
|
||||
* Wed Dec 01 2021 Maxwell G <gotmax@e.email> - 2021.12.01-1
|
||||
- Update to 2021.12.01.
|
||||
|
||||
* Tue Nov 9 2021 Maxwell G <gotmax@e.email> - 2021.11.10.1-1
|
||||
- Update to 2021.11.10.1.
|
||||
|
||||
* Tue Nov 9 2021 Maxwell G <gotmax@e.email> - 2021.10.22-2
|
||||
- Skip installing unnecessary tox dependencies
|
||||
- Fix shell-completion subpackages
|
||||
- Only package README.md; don't generate extra README.txt
|
||||
|
||||
* Sat Oct 23 2021 Maxwell G <gotmax@e.email> - 2021.10.22-1
|
||||
- Update to 2021.10.22
|
||||
|
||||
* Sun Oct 10 2021 Maxwell G <gotmax@e.email> - 2021.10.10-1
|
||||
- Mark LICENSE with %%license instead of %%doc
|
||||
- Update to 2021.10.10
|
||||
- Fix non-executable-script rpmlint error
|
||||
- Use `python3dist(NAME)` for dependencies
|
||||
- Fix rpm-buildroot-usage rpmlint error
|
||||
|
||||
* Sat Oct 9 2021 Maxwell G <gotmax@e.email> - 2021.10.09-1
|
||||
- Initial package
|
||||
%autochangelog
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue